Sebastian Lackner : server: Only send WM_WINE_CLIPCURSOR for forced clip resets.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 12 09:58:27 CST 2015


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

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Wed Nov 11 05:30:50 2015 +0100

server: Only send WM_WINE_CLIPCURSOR for forced clip resets.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 server/queue.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/queue.c b/server/queue.c
index 13ca2b2..5136f43 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -374,7 +374,7 @@ static void get_message_defaults( struct msg_queue *queue, int *x, int *y, unsig
 }
 
 /* set the cursor clip rectangle */
-static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect )
+static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, int send_clip_msg )
 {
     rectangle_t top_rect;
     int x, y;
@@ -392,7 +392,7 @@ static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect
     }
     else desktop->cursor.clip = top_rect;
 
-    if (desktop->cursor.clip_msg)
+    if (desktop->cursor.clip_msg && send_clip_msg)
         post_desktop_message( desktop, desktop->cursor.clip_msg, rect != NULL, 0 );
 
     /* warp the mouse to be inside the clip rect */
@@ -405,7 +405,7 @@ static void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect
 static void set_foreground_input( struct desktop *desktop, struct thread_input *input )
 {
     if (desktop->foreground_input == input) return;
-    set_clip_rectangle( desktop, NULL );
+    set_clip_rectangle( desktop, NULL, 1 );
     desktop->foreground_input = input;
 }
 
@@ -3091,7 +3091,7 @@ DECL_HANDLER(set_cursor)
         if (req->clip_msg && get_top_window_owner(desktop) == current->process)
             desktop->cursor.clip_msg = req->clip_msg;
 
-        set_clip_rectangle( desktop, (req->flags & SET_CURSOR_NOCLIP) ? NULL : &req->clip );
+        set_clip_rectangle( desktop, (req->flags & SET_CURSOR_NOCLIP) ? NULL : &req->clip, 0 );
     }
 
     reply->new_x       = input->desktop->cursor.x;




More information about the wine-cvs mailing list