From 7bb88af5a2b90d6556b15770fe74e83510d2f959 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 13 May 2005 14:03:06 +0000 Subject: [PATCH] Process the pending expose events on RDW_UPDATENOW before doing the redraw_window server call so that the parent windows get properly validated if necessary. --- dlls/user/painting.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/user/painting.c b/dlls/user/painting.c index 41638d9b9b3..927f886cebd 100644 --- a/dlls/user/painting.c +++ b/dlls/user/painting.c @@ -321,9 +321,6 @@ static void update_now( HWND hwnd, UINT rdw_flags ) { HWND prev = 0, child; - /* process pending expose events before painting */ - MsgWaitForMultipleObjects( 0, NULL, FALSE, 0, QS_PAINT ); - /* desktop window never gets WM_PAINT, only WM_ERASEBKGND */ if (hwnd == GetDesktopWindow()) erase_now( hwnd, rdw_flags | RDW_NOCHILDREN ); @@ -564,6 +561,9 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ) dump_rdw_flags(flags); } + /* process pending expose events before painting */ + if (flags & RDW_UPDATENOW) MsgWaitForMultipleObjects( 0, NULL, FALSE, 0, QS_PAINT ); + if (rect && !hrgn) { ret = redraw_window_rects( hwnd, flags, rect, 1 );