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

server: Change desktop cursor only when inside the thread's windows.

Getting rid of the desktop cursor handle at the same time. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55961
parent 9dc80b13
......@@ -478,13 +478,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 )
static void update_desktop_cursor_handle( struct desktop *desktop, struct thread_input *input )
{
int updated = desktop->cursor.handle != handle;
user_handle_t win = desktop->cursor.win;
desktop->cursor.handle = handle;
if (updated)
if (input == get_desktop_cursor_thread_input( desktop ))
{
user_handle_t handle = input->cursor_count < 0 ? 0 : input->cursor, win = desktop->cursor.win;
/* when clipping send the message to the foreground window as well, as some driver have an artificial overlay window */
if (is_cursor_clipped( desktop )) queue_cursor_message( desktop, 0, WM_WINE_SETCURSOR, win, handle );
queue_cursor_message( desktop, win, WM_WINE_SETCURSOR, win, handle );
......@@ -3414,10 +3412,7 @@ DECL_HANDLER(set_cursor)
if (req->flags & SET_CURSOR_NOCLIP) set_clip_rectangle( desktop, NULL, SET_CURSOR_NOCLIP, 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 );
}
update_desktop_cursor_handle( desktop, input );
reply->new_x = desktop->cursor.x;
reply->new_y = desktop->cursor.y;
......
......@@ -59,7 +59,6 @@ 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