Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48761 Signed-off-by: Roman Pišl rpisl@seznam.cz --- dlls/user32/painting.c | 9 ++++++++- dlls/user32/tests/msg.c | 1 - 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index 313c5fa1e6..d91305a714 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -1229,6 +1229,7 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ) { static const RECT empty; BOOL ret; + BOOL updated = FALSE;
if (TRACE_ON(win)) { @@ -1249,6 +1250,12 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ) /* process pending expose events before painting */ if (flags & RDW_UPDATENOW) USER_Driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_PAINT, 0 );
+ if ((flags & (RDW_INTERNALPAINT | RDW_UPDATENOW | RDW_VALIDATE)) == (RDW_INTERNALPAINT | RDW_UPDATENOW | RDW_VALIDATE)) + { + update_now( hwnd, flags ); + updated = TRUE; + } + if (rect && !hrgn) { if (IsRectEmpty( rect )) rect = ∅ @@ -1275,7 +1282,7 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags )
if (!hwnd) hwnd = GetDesktopWindow();
- if (flags & RDW_UPDATENOW) update_now( hwnd, flags ); + if (flags & RDW_UPDATENOW && !updated) update_now( hwnd, flags ); else if (flags & RDW_ERASENOW) erase_now( hwnd, flags );
return ret; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 4df10a8300..3a0dd8dbbb 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -2548,7 +2548,6 @@ static void ok_sequence_(const struct message *expected_list, const char *contex context, count, expected->message); if ((expected->flags & kbd_hook) != (actual->flags & kbd_hook)) dump++;
- todo_wine_if(line==8239) ok_( file, line) (!(expected->flags & has_update) || (actual->flags & has_update), "%s: %u: the msg 0x%04x should have update region\n", context, count, expected->message);