1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

server: Send WM_WINE_SETCURSOR with the thread input cursor handle.

Which may be different from the last desktop cursor handle.

This makes the behavior better match the old winex11 behavior, which queried
the current thread input cursor handle on every mouse move to sync it with X11,
although it contradicts MSDN documentation which states that the cursor handle
is global.

This fixes the X11 cursor being visible in "Deus Ex: GOTY Edition".
This commit is contained in:
Rémi Bernon 2023-10-10 18:11:43 +02:00 committed by Alexandre Julliard
parent 70c9239cb2
commit 2581e0b3ea

View File

@ -436,6 +436,15 @@ static int update_desktop_cursor_window( struct desktop *desktop, user_handle_t
desktop->cursor.win = win;
if (updated)
{
struct thread *thread;
if ((thread = get_window_thread( win )))
{
struct thread_input *input = thread->queue->input;
if (input) handle = input->cursor_count < 0 ? 0 : input->cursor;
release_object( thread );
}
/* 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 );