Alexandre Julliard : server: Valid rects are in parent coordinates.

Alexandre Julliard julliard at winehq.org
Thu Oct 7 11:24:28 CDT 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Oct  7 14:43:29 2010 +0200

server: Valid rects are in parent coordinates.

---

 server/protocol.def |    2 +-
 server/window.c     |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/protocol.def b/server/protocol.def
index 21cae9c..321a933 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2336,7 +2336,7 @@ enum message_type
     user_handle_t  previous;      /* previous window in Z order */
     rectangle_t    window;        /* window rectangle (in parent coords) */
     rectangle_t    client;        /* client rectangle (in parent coords) */
-    VARARG(valid,rectangles);     /* valid rectangles from WM_NCCALCSIZE (in client coords) */
+    VARARG(valid,rectangles);     /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
 @REPLY
     unsigned int   new_style;     /* new window style */
     unsigned int   new_ex_style;  /* new window extended style */
diff --git a/server/window.c b/server/window.c
index c8c075f..503f37e 100644
--- a/server/window.c
+++ b/server/window.c
@@ -2137,10 +2137,10 @@ DECL_HANDLER(set_window_pos)
     {
         rectangle_t valid_rects[2];
         memcpy( valid_rects, (const rectangle_t *)get_req_data() + 1, 2 * sizeof(rectangle_t) );
-        if (win->ex_style & WS_EX_LAYOUTRTL)
+        if (win->parent && win->parent->ex_style & WS_EX_LAYOUTRTL)
         {
-            mirror_rect( &win->client_rect, &valid_rects[0] );
-            mirror_rect( &win->client_rect, &valid_rects[1] );
+            mirror_rect( &win->parent->client_rect, &valid_rects[0] );
+            mirror_rect( &win->parent->client_rect, &valid_rects[1] );
         }
         set_window_pos( win, previous, flags, &window_rect, &client_rect, &visible_rect, valid_rects );
     }




More information about the wine-cvs mailing list