[PATCH v8 0/2] MR6199: winewayland.drv: Fix alt-tabbing out
Fix the wayland side of https://bugs.winehq.org/show_bug.cgi?id=55336 ### Exit menu key by default: That's the actual behavior, any non-special key will exit the menu key, and be sent to the client. I was also wondering if we should add `menu_sys_key = f10_key = 0;` when receiving a `WM_ACTIVATE` in `win32u/defwnd.c`'s `default_window_proc` but I guess not ? ### Fix repeated key for no reason: For some reason when ALT is pressed, it is spammed and thus spams SYS_COMMAND. This fix that, but I don't know what I am doing here. I don't see any repeating key spamming with winex11 but I could be wrong. However alt/SYS_COMMAND should not be repeated. That wasn't happening with winex11.drv. ### Fix release_all_keys modifier filtering: That was the main reason why alt-tab leads to the menu key, NtUserGetAsyncKeyboardState also uses left and right system keys. -- v8: win32u: Default to exit when tracking top menu winewayland.drv: Fix release_all_keys modifier filtering https://gitlab.winehq.org/wine/wine/-/merge_requests/6199
From: yuri_k7 <riyu12383(a)gmail.com> --- dlls/winewayland.drv/wayland_keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winewayland.drv/wayland_keyboard.c b/dlls/winewayland.drv/wayland_keyboard.c index 8f7b6dce30f..9b382204f0b 100644 --- a/dlls/winewayland.drv/wayland_keyboard.c +++ b/dlls/winewayland.drv/wayland_keyboard.c @@ -629,8 +629,8 @@ static void release_all_keys(HWND hwnd) { /* Skip mouse buttons. */ if (vkey < 7 && vkey != VK_CANCEL) continue; - /* Skip left/right-agnostic modifier vkeys. */ - if (vkey == VK_SHIFT || vkey == VK_CONTROL || vkey == VK_MENU) continue; + /* Skip modifier vkeys. */ + if (vkey == VK_SHIFT || vkey == VK_CONTROL || vkey == VK_MENU || (vkey >= VK_LSHIFT && vkey <= VK_RMENU)) continue; if (state[vkey] & 0x80) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6199
From: YuriK7 <riyu12383(a)gmail.com> --- dlls/win32u/menu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/win32u/menu.c b/dlls/win32u/menu.c index 0d1b3ec9667..90faab60898 100644 --- a/dlls/win32u/menu.c +++ b/dlls/win32u/menu.c @@ -4282,6 +4282,8 @@ static BOOL track_menu( HMENU hmenu, UINT flags, int x, int y, HWND hwnd, const default: NtUserTranslateMessage( &msg, 0 ); + if (mt.hCurrentMenu == mt.hTopMenu) + exit_menu = menu_key_escape( &mt, flags ); break; } break; /* WM_KEYDOWN */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6199
participants (3)
-
yuri_k7 -
YuriK7 -
YuriK7 (@riyu12383)