Summary:
During the Wayland porting a KWin internal global shortcut handling got
implemented prior to the porting of KGlobalAccel. This allowed to trigger
global shortcuts with a KGlobalAccel still on X11 and unknown to KWin.
Nowadays KWin directly provides KGlobalAccel, thus it's no longer
required. The code was runtime dead as we always have a KGlobalAccel.
Reviewers: #plasma, #kwin
Subscribers: plasma-devel
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4165
So far this method translated the keysym to Qt::Key. This is no longer
needed as the only method which invokes processKey has access to the
translated key. Thus saving one translation for every key press.
Reviewed-By: bshah
The KGlobalAccelD which gets created by KWin needs a plugin for the
platform specific parts. This change introduces such a plugin. It's
linked against kwin so that it can integrate with the core.
On enable the plugin registers itself in the InputRedirection and
GlobalShortcutsManager checks the plugin whether a shortcut got
triggered.
As the loading of the plugin must happen after InputRedirection is
fully created a dedicated init method is added to InputRedirection.
REVIEW: 124187
A new GlobalShortcutsManager is introduced which is responsible for
holding the registered shortcuts and triggering the matching action.
The InputRedirection checks with the GlobalShortcutManager whether a key
press event triggers a global shortcut and stops processing the event in
that case.
At the moment the GlobalShortcutsManager only supports the very basics
for KWin internal usage. External applications can not yet make usage of
the global shortcut system inside KWin.