Created attachment 156435 [details] X11 Unmanaged Window SUMMARY STEPS TO REPRODUCE 1. Open VMware workstation 17 on Kwin wayland. 2. Run Windows or Linux in VM. 2. Press shortcuts which combined with Win, Alt. OBSERVED RESULT The host task switcher grabed shortcuts first, the VM grabed it again. EXPECTED RESULT Keyboard grab should be inhibited in host. VM grab the shortcuts. SOFTWARE/OS VERSIONS Arch Linux 6.1.11 Linux/KDE Plasma: 5.27.0 KDE Plasma Version: 5.27.0 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8 ADDITIONAL INFORMATION Keyboard xwayland protocol didn't be added in kwin 5.26.5. So the shortcuts in vmware or freerdp(X11) can't be grabbed correctly. For kwin 5.27, the shortcuts feature was added, so freerdp (X11) can grab shortcuts correctly. https://invent.kde.org/lijiahao/kwin/-/blob/master/src/wayland/keyboard_shortcuts_inhibit_v1_interface.cpp However, the same issue existed in vmware. I think it may caused by the X11 unmanaged window. Xwayland can't handle the unmanaged key grab correctly? https://linux.die.net/man/3/xgrabkeyboard VMware workstation has two windows: GTK UI and VM virtual desktop. The GTK UI was managed by X11. But the VM window was unmanaged.
The unmanaged window must have keyboard focus (from kwin's perspective). Otherwise kwin is not going to inhibit global shortcuts. Can you check that it's the case?
(In reply to Vlad Zahorodnii from comment #1) > The unmanaged window must have keyboard focus (from kwin's perspective). > Otherwise kwin is not going to inhibit global shortcuts. Can you check that > it's the case? I checked that with xev and xwinfo. The vmware children windows are special. It can't handle correct mouse enter event correctly. It's not bug in kwin. The input grab code implements are different in varities X11 softwares. Mutter can force grab it by setting. https://gitlab.gnome.org/GNOME/mutter/-/issues/1720 But KDE has a better way to do it. I added a troubleshooting on Archwiki. https://wiki.archlinux.org/title/KDE#X11_shortcuts_conflict_on_Wayland