Commit b04ef199 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

server: Keep track of the current desktop cursor handle.

parent 10f5ff7f
......@@ -431,6 +431,11 @@ static int update_desktop_cursor_pos( struct desktop *desktop, user_handle_t win
return updated;
}
static void update_desktop_cursor_handle( struct desktop *desktop, user_handle_t handle )
{
desktop->cursor.handle = handle;
}
/* set the cursor position and queue the corresponding mouse message */
static void set_cursor_pos( struct desktop *desktop, int x, int y )
{
......@@ -3356,6 +3361,12 @@ DECL_HANDLER(set_cursor)
if (req->flags & SET_CURSOR_CLIP) set_clip_rectangle( desktop, &req->clip, 0 );
if (req->flags & SET_CURSOR_NOCLIP) set_clip_rectangle( desktop, NULL, 0 );
if (req->flags & (SET_CURSOR_HANDLE | SET_CURSOR_COUNT))
{
if (input->cursor_count < 0) update_desktop_cursor_handle( desktop, 0 );
else update_desktop_cursor_handle( desktop, input->cursor );
}
reply->new_x = desktop->cursor.x;
reply->new_y = desktop->cursor.y;
reply->new_clip = desktop->cursor.clip;
......
......@@ -59,6 +59,7 @@ struct global_cursor
rectangle_t clip; /* cursor clip rectangle */
unsigned int last_change; /* time of last position change */
user_handle_t win; /* window that contains the cursor */
user_handle_t handle; /* last set cursor handle */
};
struct desktop
......
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