mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 19:58:08 +00:00
server: Keep track of the current desktop cursor handle.
This commit is contained in:
parent
10f5ff7f06
commit
b04ef19930
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue