server: Only send WM_WINE_CLIPCURSOR for forced clip resets.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2015-11-11 05:30:50 +01:00 committed by Alexandre Julliard
parent 5eb3035374
commit 55c4a108d7
1 changed files with 4 additions and 4 deletions

View File

@ -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;