From: Rémi Bernon rbernon@codeweavers.com
--- server/queue.c | 11 +++++++++++ server/user.h | 1 + 2 files changed, 12 insertions(+)
diff --git a/server/queue.c b/server/queue.c index dd52fc43716..211fc295e41 100644 --- a/server/queue.c +++ b/server/queue.c @@ -434,6 +434,11 @@ int update_desktop_cursor_pos( struct desktop *desktop, user_handle_t win, int x 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 ) { @@ -3315,6 +3320,12 @@ DECL_HANDLER(set_cursor) set_clip_rectangle( desktop, (req->flags & SET_CURSOR_NOCLIP) ? NULL : &req->clip, 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; diff --git a/server/user.h b/server/user.h index 24533b64605..4d86d201db5 100644 --- a/server/user.h +++ b/server/user.h @@ -60,6 +60,7 @@ struct global_cursor unsigned int clip_msg; /* message to post for cursor clip changes */ 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