graesslin created this revision. graesslin added reviewers: KWin, Plasma. graesslin added a task: T5220: Create InputEventSpy for ModifierOnlyShortcuts. Restricted Application added a project: KWin. Restricted Application added subscribers: kwin, plasma-devel.
REVISION SUMMARY The functionality regarding triggering modifier only shortcuts is moved out of Xkb - where it doesn't belong to - and is turned into an input event spy listening for the changes it is interested in. Previously the state got queried by asking e.g. for the pressed buttons, now it's tracked directly. The X11 side needs a larger change due to that as now pushing the events into Xkb does not trigger modifier only shortcuts any more. Instead the "normal" way through the platform API needs to be used which triggers the processing of filters and spies. The problem here is that our redirections only process events if they are inited and that only happens on Wayland. We cannot call init on them as that would create all the Wayland filters and spies and processing would probably break. As an intermediate solution the spies are now processed and there we know that it won't matter. A future solution would be to remove the init checks completely and just send through both filters and spies and ensure that on X11 only the supported ones are loaded. Closes https://phabricator.kde.org/T5220 TEST PLAN Tested on Wayland and X11 REPOSITORY R108 KWin BRANCH modifier-only-shortcuts REVISION DETAIL https://phabricator.kde.org/D4578 AFFECTED FILES CMakeLists.txt keyboard_input.cpp keyboard_input.h modifier_only_shortcuts.cpp modifier_only_shortcuts.h plugins/platforms/x11/standalone/x11_platform.cpp plugins/platforms/x11/standalone/xinputintegration.cpp plugins/platforms/x11/standalone/xinputintegration.h pointer_input.cpp EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: graesslin, #kwin, #plasma Cc: plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol