From: "Anna (navi) Figueiredo Gomes" <navi@vlhl.dev> Seems like pointerId 1 is always the mouse, regardless of EnableMouseInPointer. --- dlls/win32u/input.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 6dcc5c6e40d..7c7678766c3 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -2883,11 +2883,16 @@ INT WINAPI NtUserScheduleDispatchNotification( HWND hwnd ) return 0; } +static struct pointer *allocate_pointerid( UINT32 id ); + static struct pointer_thread_data *get_pointer_thread_data(void) { struct user_thread_info *thread_info = get_user_thread_info(); if (!thread_info->pointer_data && (thread_info->pointer_data = calloc( 1, sizeof(*thread_info->pointer_data) ))) + { list_init( &thread_info->pointer_data->known_pointers ); + allocate_pointerid( 1 ); + } return thread_info->pointer_data; }; @@ -2908,6 +2913,7 @@ static struct pointer *find_pointerid( UINT32 id ) return NULL; } + static struct pointer *allocate_pointerid( UINT32 id ) { struct pointer_thread_data *thread_data = get_pointer_thread_data(); @@ -2917,13 +2923,11 @@ static struct pointer *allocate_pointerid( UINT32 id ) if (!thread_data || !(pointer = calloc( 1, sizeof(*pointer) ))) return NULL; - pointer->id = id; list_add_tail( &thread_data->known_pointers, &pointer->entry ); return pointer; } - static POINTER_INFO pointer_info_from_msg( const MSG *msg ) { POINT location = { LOWORD( msg->lParam ), HIWORD( msg->lParam ) }; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11171