[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: [Differential] [Request, 263 lines] D3863: Introduce an InputEventSpy for processing input events
From: graesslin_(Martin_Gräßlin) <noreply () phabricator ! kde ! or
Date: 2016-12-29 18:05:37
Message-ID: differential-rev-PHID-DREV-nlbfxxcjbqvnkpbjdoan-req () phabricator ! kde ! org
[Download RAW message or body]
graesslin created this revision.
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: kwin, plasma-devel.
REVISION 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.
REPOSITORY
R108 KWin
BRANCH
input-event-spy
REVISION DETAIL
https://phabricator.kde.org/D3863
AFFECTED FILES
input.cpp
input.h
input_event_spy.cpp
input_event_spy.h
keyboard_input.cpp
pointer_input.cpp
touch_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
[Attachment #3 (text/html)]
<table><tr><td style="">graesslin created this revision.<br />graesslin added \
reviewers: KWin, Plasma.<br />Restricted Application added a project: KWin.<br \
/>Restricted Application added subscribers: kwin, plasma-devel. </td><a \
style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; \
color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; \
background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; \
border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D3863" \
rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION \
SUMMARY</strong><div><p>So far KWin's input event processing is mostly based \
on<br /> InputEventFilters. A filter can - as the name suggest - filter out an<br />
input event from further processing. Our code shows that this is not<br />
sufficient for all input event processing.</p>
<p>We have several areas inside KWin where we need to have access to all<br />
input events, where the processing needs to happen on all events and<br />
filtering is not allowed. This results in sub-optimal code which has<br />
classes which know too much and do too much.</p>
<p>Examples:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">key-repeat handling done in \
KeyboardInputRedirection</li> <li class="remarkup-list-item">Layout change OSD in \
Xkb</li> <li class="remarkup-list-item">modifier only shortcuts in Xkb</li>
<li class="remarkup-list-item">emitting signals for Cursor class in \
KeyboardInputRedirection</li> </ul>
<p>Also there are misuses of the InputEventFilters and internal API</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">DebugConsole keyboard state (uses wrong \
information)</li> <li class="remarkup-list-item">DebugConsole input events tab (uses \
Filter, should be a spy)</li> </ul>
<p>This change introduces the API needed to fix these problems. It<br />
introduces an InputEventSpy which is modelled after the InputEventFilter<br />
with the difference that it has only void messages and uses the KWin<br />
introduced event classes.</p>
<p>The spies are always processed prior to the filters, thus we know it can<br />
have all events.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 \
KWin</div></div></div><br \
/><div><strong>BRANCH</strong><div><div>input-event-spy</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D3863" \
rel="noreferrer">https://phabricator.kde.org/D3863</a></div></div><br \
/><div><strong>AFFECTED FILES</strong><div><div>input.cpp<br /> input.h<br />
input_event_spy.cpp<br />
input_event_spy.h<br />
keyboard_input.cpp<br />
pointer_input.cpp<br />
touch_input.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a \
href="https://phabricator.kde.org/settings/panel/emailpreferences/" \
rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br \
/><div><strong>To: </strong>graesslin, KWin, Plasma<br /><strong>Cc: \
</strong>plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, \
abetts, sebas<br /></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic