Commit 55c4a108 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

server: Only send WM_WINE_CLIPCURSOR for forced clip resets.

parent 5eb30353
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment