mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 00:13:57 +00:00
scroll the console properly instead of repainting it
svn path=/trunk/; revision=19719
This commit is contained in:
parent
72a514b6e6
commit
8da9b240f0
|
@ -488,7 +488,7 @@ GuiWriteStream(PCSRSS_CONSOLE Console, RECT *Region, LONG CursorStartX, LONG Cur
|
|||
PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA) Console->PrivateData;
|
||||
PCSRSS_SCREEN_BUFFER Buff = Console->ActiveBuffer;
|
||||
LONG CursorEndX, CursorEndY;
|
||||
RECT Source, ScrollRect;
|
||||
RECT ScrollRect;
|
||||
|
||||
if (NULL == Console->hWindow || NULL == GuiData)
|
||||
{
|
||||
|
@ -497,16 +497,19 @@ GuiWriteStream(PCSRSS_CONSOLE Console, RECT *Region, LONG CursorStartX, LONG Cur
|
|||
|
||||
if (0 != ScrolledLines)
|
||||
{
|
||||
Source.left = 0;
|
||||
Source.top = ScrolledLines;
|
||||
Source.right = Console->Size.X - 1;
|
||||
Source.bottom = ScrolledLines + Region->top - 1;
|
||||
ScrollRect.left = 0;
|
||||
ScrollRect.top = 0;
|
||||
ScrollRect.right = Console->Size.X * GuiData->CharWidth;
|
||||
ScrollRect.bottom = Region->top * GuiData->CharHeight;
|
||||
|
||||
InvalidateRect(Console->hWindow, &ScrollRect, FALSE);
|
||||
ScrollWindowEx(Console->hWindow,
|
||||
0,
|
||||
-(ScrolledLines * GuiData->CharHeight),
|
||||
&ScrollRect,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
SW_INVALIDATE);
|
||||
}
|
||||
|
||||
GuiIntDrawRegion(GuiData, Console->hWindow, Region);
|
||||
|
|
Loading…
Reference in a new issue