[1/2] server: Make sure that region and rectangle have the same origin before calling rect_in_region(). Take 2.

Dmitry Timoshkov dmitry at baikal.ru
Wed Jun 6 00:47:45 CDT 2012


---
 server/window.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/window.c b/server/window.c
index 329fdb6..3456e1a 100644
--- a/server/window.c
+++ b/server/window.c
@@ -2457,7 +2457,12 @@ DECL_HANDLER(update_window_zorder)
         if (!(ptr->style & WS_VISIBLE)) continue;
         if (ptr->ex_style & WS_EX_TRANSPARENT) continue;
         if (!intersect_rect( &tmp, &ptr->visible_rect, &rect )) continue;
-        if (ptr->win_region && !rect_in_region( ptr->win_region, &rect )) continue;
+        if (ptr->win_region)
+        {
+            tmp = rect;
+            offset_rect( &tmp, -ptr->window_rect.left, -ptr->window_rect.top );
+            if (!rect_in_region( ptr->win_region, &tmp )) continue;
+        }
         /* found a window obscuring the rectangle, now move win above this one */
         /* making sure to not violate the topmost rule */
         if (!(ptr->ex_style & WS_EX_TOPMOST) || (win->ex_style & WS_EX_TOPMOST))
-- 
1.7.10.1




More information about the wine-patches mailing list