Commit Graph

3 Commits (95ff4a2d49d897739f58e931454edf0272798038)

Author SHA1 Message Date
Martin Flöser d2a9232ad3 Pass SwitchEvent from LibInput through KWin and add to DebugConsole
Summary:
This change introduces a new SwitchEvent and passes it through the
InputEventSpy and InputEventFilter. The DebugConsoleFilter implements it
so that the events can be monitored in the debug console.

Test Plan: Untested as my only device with such switches has too old libinput

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9521
2018-01-09 19:32:58 +01:00
Martin Gräßlin a9ac70f007 It makes sense to actually also build the new input_event_spy.cpp
Sometimes C++ surprises me. How could that compile without being in
the build set?
2016-12-30 19:32:47 +01:00
Martin Gräßlin 84e3308149 Introduce an InputEventSpy for processing input events
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
2016-12-30 18:29:40 +01:00