Desktop window is repainted on WM_ERASEBKGND, it must never get a
WM_PAINT.
This commit is contained in:
parent
e2a7181069
commit
56206376b8
|
@ -265,7 +265,7 @@ static BOOL send_erase( HWND hwnd, UINT flags, HRGN client_rgn,
|
|||
}
|
||||
if (!hdc_ret)
|
||||
{
|
||||
if (need_erase) /* FIXME: mark it as needing erase again */
|
||||
if (need_erase && hwnd != GetDesktopWindow()) /* FIXME: mark it as needing erase again */
|
||||
RedrawWindow( hwnd, NULL, client_rgn, RDW_INVALIDATE | RDW_ERASE | RDW_NOCHILDREN );
|
||||
ReleaseDC( hwnd, hdc );
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ static BOOL send_erase( HWND hwnd, UINT flags, HRGN client_rgn,
|
|||
*
|
||||
* Implementation of RDW_ERASENOW behavior.
|
||||
*/
|
||||
void erase_now( HWND hwnd, UINT rdw_flags )
|
||||
static void erase_now( HWND hwnd, UINT rdw_flags )
|
||||
{
|
||||
HWND child;
|
||||
HRGN hrgn;
|
||||
|
@ -324,10 +324,13 @@ void erase_now( HWND hwnd, UINT rdw_flags )
|
|||
* HIWORD(lParam) = hwndSkip (not used; always NULL)
|
||||
*
|
||||
*/
|
||||
void update_now( HWND hwnd, UINT rdw_flags )
|
||||
static void update_now( HWND hwnd, UINT rdw_flags )
|
||||
{
|
||||
HWND child;
|
||||
|
||||
/* desktop window never gets WM_PAINT, only WM_ERASEBKGND */
|
||||
if (hwnd == GetDesktopWindow()) erase_now( hwnd, rdw_flags | RDW_NOCHILDREN );
|
||||
|
||||
/* loop while we find a child to repaint */
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -44,8 +44,7 @@ static LRESULT WINAPI desktop_winproc( HWND hwnd, UINT message, WPARAM wParam, L
|
|||
|
||||
case WM_ERASEBKGND:
|
||||
PaintDesktop( (HDC)wParam );
|
||||
ValidateRect( hwnd, NULL );
|
||||
break;
|
||||
return TRUE;
|
||||
|
||||
case WM_SYSCOMMAND:
|
||||
if ((wParam & 0xfff0) == SC_CLOSE) ExitWindows( 0, 0 );
|
||||
|
|
|
@ -1660,7 +1660,12 @@ DECL_HANDLER(get_update_region)
|
|||
else
|
||||
{
|
||||
if (reply->flags & UPDATE_NONCLIENT) validate_non_client( win );
|
||||
if (reply->flags & UPDATE_ERASE) win->paint_flags &= ~PAINT_ERASE;
|
||||
if (reply->flags & UPDATE_ERASE)
|
||||
{
|
||||
win->paint_flags &= ~PAINT_ERASE;
|
||||
/* desktop window only gets erased, not repainted */
|
||||
if (win == top_window) validate_whole_window( win );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue