mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
Make sure that WM_NCPAINT messages are generated by calling BeginPaint
svn path=/trunk/; revision=19895
This commit is contained in:
parent
052218fc23
commit
b3329d6391
1 changed files with 35 additions and 44 deletions
|
@ -360,19 +360,15 @@ GuiConsolePaint(PCSRSS_CONSOLE Console,
|
|||
static VOID FASTCALL
|
||||
GuiConsoleHandlePaint(HWND hWnd, HDC hDCPaint)
|
||||
{
|
||||
RECT rcUpdate;
|
||||
HDC hDC;
|
||||
PAINTSTRUCT ps;
|
||||
PCSRSS_CONSOLE Console;
|
||||
PGUI_CONSOLE_DATA GuiData;
|
||||
|
||||
if (GetUpdateRect(hWnd,
|
||||
&rcUpdate,
|
||||
FALSE))
|
||||
{
|
||||
hDC = (hDCPaint != NULL ? hDCPaint : BeginPaint(hWnd,
|
||||
&ps));
|
||||
if (hDC != NULL)
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
if (hDC != NULL &&
|
||||
ps.rcPaint.left < ps.rcPaint.right &&
|
||||
ps.rcPaint.top < ps.rcPaint.bottom)
|
||||
{
|
||||
GuiConsoleGetDataPointers(hWnd,
|
||||
&Console,
|
||||
|
@ -385,7 +381,7 @@ GuiConsoleHandlePaint(HWND hWnd, HDC hDCPaint)
|
|||
GuiConsolePaint(Console,
|
||||
GuiData,
|
||||
hDC,
|
||||
&rcUpdate);
|
||||
&ps.rcPaint);
|
||||
|
||||
if (GuiData->Selection.left != -1)
|
||||
{
|
||||
|
@ -398,7 +394,7 @@ GuiConsoleHandlePaint(HWND hWnd, HDC hDCPaint)
|
|||
|
||||
/* invert the selection */
|
||||
if (IntersectRect(&rc,
|
||||
&rcUpdate,
|
||||
&ps.rcPaint,
|
||||
&rc))
|
||||
{
|
||||
PatBlt(hDC,
|
||||
|
@ -413,12 +409,7 @@ GuiConsoleHandlePaint(HWND hWnd, HDC hDCPaint)
|
|||
LeaveCriticalSection(&GuiData->Lock);
|
||||
}
|
||||
|
||||
if (hDCPaint == NULL)
|
||||
{
|
||||
EndPaint(hWnd,
|
||||
&ps);
|
||||
}
|
||||
}
|
||||
EndPaint(hWnd, &ps);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue