[PATCH 0/1] MR11038: server: Fix numpad vkey handling.
It looks like 2eeb4d5192e808c18e5949cc1c14b51b22fee342 missed updating the hunk introduced a bit earlier by 11ef7af768427a8fe38a43351377100086357388. Fixes: 2eeb4d5192e808c18e5949cc1c14b51b22fee342 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11038
From: Matteo Bruni <mbruni@codeweavers.com> It looks like 2eeb4d5192e808c18e5949cc1c14b51b22fee342 missed updating the hunk introduced a bit earlier by 11ef7af768427a8fe38a43351377100086357388. Fixes: 2eeb4d5192e808c18e5949cc1c14b51b22fee342 --- server/queue.c | 36 ++++++++++++++++++------------------ server/user.h | 1 - 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/server/queue.c b/server/queue.c index abae70fc91b..a04b53b70de 100644 --- a/server/queue.c +++ b/server/queue.c @@ -2419,24 +2419,24 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c } /* send numpad vkeys if NumLock is active */ - if ((input->kbd.vkey & KBDNUMPAD) && (desktop->keystate[VK_NUMLOCK] & 0x01) && - !(desktop->keystate[VK_SHIFT] & 0x80)) - { - switch (vkey) - { - case VK_INSERT: hook_vkey = vkey = VK_NUMPAD0; break; - case VK_END: hook_vkey = vkey = VK_NUMPAD1; break; - case VK_DOWN: hook_vkey = vkey = VK_NUMPAD2; break; - case VK_NEXT: hook_vkey = vkey = VK_NUMPAD3; break; - case VK_LEFT: hook_vkey = vkey = VK_NUMPAD4; break; - case VK_CLEAR: hook_vkey = vkey = VK_NUMPAD5; break; - case VK_RIGHT: hook_vkey = vkey = VK_NUMPAD6; break; - case VK_HOME: hook_vkey = vkey = VK_NUMPAD7; break; - case VK_UP: hook_vkey = vkey = VK_NUMPAD8; break; - case VK_PRIOR: hook_vkey = vkey = VK_NUMPAD9; break; - case VK_DELETE: hook_vkey = vkey = VK_DECIMAL; break; - default: break; - } + if ((input->kbd.vkey & KBDNUMPAD) && (desktop_shm->keystate[VK_NUMLOCK] & 0x01) && + !(desktop_shm->keystate[VK_SHIFT] & 0x80)) + { + switch (vkey) + { + case VK_INSERT: hook_vkey = vkey = VK_NUMPAD0; break; + case VK_END: hook_vkey = vkey = VK_NUMPAD1; break; + case VK_DOWN: hook_vkey = vkey = VK_NUMPAD2; break; + case VK_NEXT: hook_vkey = vkey = VK_NUMPAD3; break; + case VK_LEFT: hook_vkey = vkey = VK_NUMPAD4; break; + case VK_CLEAR: hook_vkey = vkey = VK_NUMPAD5; break; + case VK_RIGHT: hook_vkey = vkey = VK_NUMPAD6; break; + case VK_HOME: hook_vkey = vkey = VK_NUMPAD7; break; + case VK_UP: hook_vkey = vkey = VK_NUMPAD8; break; + case VK_PRIOR: hook_vkey = vkey = VK_NUMPAD9; break; + case VK_DELETE: hook_vkey = vkey = VK_DECIMAL; break; + default: break; + } } if (origin == IMO_HARDWARE) diff --git a/server/user.h b/server/user.h index 060e54ec775..ed4660572c6 100644 --- a/server/user.h +++ b/server/user.h @@ -81,7 +81,6 @@ struct desktop struct thread_input *foreground_input; /* thread input of foreground thread */ process_id_t foreground_pid; /* id of the foreground process */ unsigned int users; /* processes and threads using this desktop */ - unsigned char keystate[256]; /* asynchronous key state */ unsigned char alt_pressed; /* last key press was Alt (used to determine msg on release) */ struct key_repeat key_repeat; /* key auto-repeat */ unsigned int clip_flags; /* last cursor clip flags */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11038
This merge request was approved by Rémi Bernon. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11038
This merge request was approved by Matteo Bruni. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11038
participants (3)
-
Matteo Bruni -
Matteo Bruni (@Mystral) -
Rémi Bernon (@rbernon)