diff --git a/windows/painting.c b/windows/painting.c index c3c9187ee86..3b8148584ae 100644 --- a/windows/painting.c +++ b/windows/painting.c @@ -712,8 +712,6 @@ static HRGN RDW_Paint( WND* wndPtr, HRGN hrgn, UINT flags, UINT ex ) if (flags & RDW_UPDATENOW) { - /* process pending events and messages before painting */ - MsgWaitForMultipleObjects( 0, NULL, FALSE, 0, QS_ALLINPUT ); if (wndPtr->hrgnUpdate) /* wm_painticon wparam is 1 */ SendMessageW( hWnd, (bIcon) ? WM_PAINTICON : WM_PAINT, bIcon, 0 ); } @@ -819,6 +817,11 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rectUpdate, } } + + /* process pending events and messages before painting */ + if (flags & RDW_UPDATENOW) + MsgWaitForMultipleObjects( 0, NULL, FALSE, 0, QS_ALLINPUT ); + /* prepare an update region in window coordinates */ if( flags & RDW_FRAME )