Summary:
So far KWin's input event processing is mostly based on
InputEventFilters. A filter can - as the name suggest - filter out an
input event from further processing. Our code shows that this is not
sufficient for all input event processing.
We have several areas inside KWin where we need to have access to all
input events, where the processing needs to happen on all events and
filtering is not allowed. This results in sub-optimal code which has
classes which know too much and do too much.
Examples:
* key-repeat handling done in KeyboardInputRedirection
* Layout change OSD in Xkb
* modifier only shortcuts in Xkb
* emitting signals for Cursor class in KeyboardInputRedirection
Also there are misuses of the InputEventFilters and internal API
* DebugConsole keyboard state (uses wrong information)
* DebugConsole input events tab (uses Filter, should be a spy)
This change introduces the API needed to fix these problems. It
introduces an InputEventSpy which is modelled after the InputEventFilter
with the difference that it has only void messages and uses the KWin
introduced event classes.
The spies are always processed prior to the filters, thus we know it can
have all events.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3863