[Wine-patches] [eter-2.0.0] server: Make sure that region and rectangle have the same origin before calling rect_in_region(). (eterbug #7940)

Dmitry Timoshkov dmitry на baikal.ru
Чт Июн 7 07:32:27 MSK 2012


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

diff --git a/server/window.c b/server/window.c
index d1c9830..5c47a39 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



Подробная информация о списке рассылки Wine-patches