From 1dba866e6175d5de4a33a81b26c415a646484e41 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard <julliard@winehq.org> Date: Thu, 19 Apr 2012 16:34:37 +0200 Subject: [PATCH] user32: Don't invalidate DCEs for sibling top-level windows since they are not clipped. --- dlls/user32/painting.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index c3a25fb1007..60252c6c548 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -425,18 +425,17 @@ void invalidate_dce( HWND hwnd, const RECT *extra_rect ) if (dce->hwnd == hwnd || IsChild( hwnd, dce->hwnd )) { make_dc_dirty( dce ); + continue; } - else /* otherwise check if the window rectangle intersects this DCE window */ + + /* otherwise check if the window rectangle intersects this DCE window */ + if (hwndScope == dce->hwnd || IsChild( hwndScope, dce->hwnd )) { - if (hwndScope == GetDesktopWindow() || - hwndScope == dce->hwnd || IsChild( hwndScope, dce->hwnd )) - { - RECT dce_rect, tmp; - GetWindowRect( dce->hwnd, &dce_rect ); - if (IntersectRect( &tmp, &dce_rect, &window_rect ) || - (extra_rect && IntersectRect( &tmp, &dce_rect, extra_rect ))) - make_dc_dirty( dce ); - } + RECT dce_rect, tmp; + GetWindowRect( dce->hwnd, &dce_rect ); + if (IntersectRect( &tmp, &dce_rect, &window_rect ) || + (extra_rect && IntersectRect( &tmp, &dce_rect, extra_rect ))) + make_dc_dirty( dce ); } } USER_Unlock(); -- GitLab