Alexandre Julliard : user32: Don' t invalidate DCEs for sibling top-level windows since they are not clipped.

Alexandre Julliard julliard at winehq.org
Thu Apr 19 13:27:52 CDT 2012


Module: wine
Branch: master
Commit: 1dba866e6175d5de4a33a81b26c415a646484e41
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1dba866e6175d5de4a33a81b26c415a646484e41

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 19 16:34:37 2012 +0200

user32: Don't invalidate DCEs for sibling top-level windows since they are not clipped.

---

 dlls/user32/painting.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c
index c3a25fb..60252c6 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();




More information about the wine-cvs mailing list