From: Rémi Bernon <rbernon(a)codeweavers.com> We are preferring the thread input cursor over the global desktop cursor, but if the thread input has no cursor yet, for instance when thread is attached to another thread without a message queue yet, it will end up being invisible. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55961 --- server/queue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/queue.c b/server/queue.c index 0558bd111f9..ae34bb1819e 100644 --- a/server/queue.c +++ b/server/queue.c @@ -110,6 +110,7 @@ struct thread_input int caret_hide; /* caret hide count */ int caret_state; /* caret on/off state */ user_handle_t cursor; /* current cursor */ + int has_cursor; /* cursor has been set */ int cursor_count; /* cursor show count */ struct list msg_list; /* list of hardware messages */ unsigned char keystate[256]; /* state of each key */ @@ -263,6 +264,7 @@ static struct thread_input *create_thread_input( struct thread *thread ) input->menu_owner = 0; input->move_size = 0; input->cursor = 0; + input->has_cursor = 0; input->cursor_count = 0; list_init( &input->msg_list ); set_caret_window( input, 0 ); @@ -441,7 +443,7 @@ static int update_desktop_cursor_window( struct desktop *desktop, user_handle_t if ((thread = get_window_thread( win ))) { struct thread_input *input = thread->queue->input; - if (input) handle = input->cursor_count < 0 ? 0 : input->cursor; + if (input && input->has_cursor) handle = input->cursor_count < 0 ? 0 : input->cursor; release_object( thread ); } @@ -3385,6 +3387,7 @@ DECL_HANDLER(set_cursor) return; } input->cursor = req->handle; + input->has_cursor = 1; } if (req->flags & SET_CURSOR_COUNT) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4676