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 );