Alexandre Julliard : server: Fix desktop window coordinates mapping in expose_window.

Alexandre Julliard julliard at winehq.org
Tue Mar 18 07:44:56 CDT 2008


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Mar 18 12:22:53 2008 +0100

server: Fix desktop window coordinates mapping in expose_window.

---

 server/window.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/server/window.c b/server/window.c
index 2633cd2..e0c202e 100644
--- a/server/window.c
+++ b/server/window.c
@@ -1364,7 +1364,6 @@ static struct region *expose_window( struct window *win, const rectangle_t *old_
                                      struct region *old_vis_rgn )
 {
     struct region *new_vis_rgn, *exposed_rgn;
-    int offset_x, offset_y;
 
     if (!(new_vis_rgn = get_visible_region( win, DCX_WINDOW ))) return NULL;
 
@@ -1383,16 +1382,8 @@ static struct region *expose_window( struct window *win, const rectangle_t *old_
         }
     }
 
-    offset_x = old_window_rect->left - win->client_rect.left;
-    offset_y = old_window_rect->top - win->client_rect.top;
     if (win->parent)
     {
-        if (!is_desktop_window(win->parent))
-        {
-            offset_x += win->client_rect.left;
-            offset_y += win->client_rect.top;
-        }
-
         /* make it relative to the old window pos for subtracting */
         offset_region( new_vis_rgn, win->window_rect.left - old_window_rect->left,
                        win->window_rect.top - old_window_rect->top  );
@@ -1403,7 +1394,8 @@ static struct region *expose_window( struct window *win, const rectangle_t *old_
         {
             if (!is_region_empty( new_vis_rgn ))
             {
-                offset_region( new_vis_rgn, offset_x, offset_y );
+                /* make it relative to parent */
+                offset_region( new_vis_rgn, old_window_rect->left, old_window_rect->top );
                 redraw_window( win->parent, new_vis_rgn, 0, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN );
             }
         }




More information about the wine-cvs mailing list