Module: wine Branch: master Commit: d38d455c4b9538795bd50b3ebee7df84bc451944 URL: https://gitlab.winehq.org/wine/wine/-/commit/d38d455c4b9538795bd50b3ebee7df8...
Author: Alexandros Frantzis alexandros.frantzis@collabora.com Date: Fri May 31 11:34:12 2024 +0300
server: Set VK_PACKET async state in raw input legacy mode.
---
dlls/user32/tests/input.c | 3 +-- server/queue.c | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 94db58e6796..9196e67c15b 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -1502,8 +1502,7 @@ static void test_SendInput_raw_key_messages( WORD vkey, WORD wch, HKL hkl ) }; struct send_input_keyboard_test raw_unicode_nolegacy[] = { - {.scan = 0x3c0, .flags = KEYEVENTF_UNICODE, .async = TRUE, - .expect_async = {[VK_PACKET] = 0x80}, .todo_async = {[VK_PACKET] = TRUE}}, + {.scan = 0x3c0, .flags = KEYEVENTF_UNICODE, .async = TRUE, .expect_async = {[VK_PACKET] = 0x80}}, {.scan = 0x3c0, .flags = KEYEVENTF_KEYUP | KEYEVENTF_UNICODE}, {0}, }; diff --git a/server/queue.c b/server/queue.c index 4d48da1d484..e881e40271d 100644 --- a/server/queue.c +++ b/server/queue.c @@ -2106,6 +2106,9 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
switch (vkey) { + case 0: + if (unicode) vkey = hook_vkey = VK_PACKET; + break; case VK_MENU: case VK_LMENU: case VK_RMENU: @@ -2217,11 +2220,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c msg->msg = message_code; if (origin == IMO_INJECTED) msg_data->flags = LLKHF_INJECTED;
- if (unicode && !vkey) - { - vkey = hook_vkey = VK_PACKET; - } - else + if (!unicode || input->kbd.vkey) { if (input->kbd.flags & KEYEVENTF_EXTENDEDKEY) flags |= KF_EXTENDED; /* FIXME: set KF_DLGMODE and KF_MENUMODE when needed */