[Differential] [Request, 421 lines] D1667: Pass LibInput::Device* through the event handlers
graesslin (Martin Gräßlin)
noreply at phabricator.kde.org
Tue May 24 09:04:23 UTC 2016
graesslin created this revision.
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY
The signals emitted by LibInput::Connection carry the Device for which
the input event was received. This Device is passed to the input handlers.
Custom event classes are added which extend QMouseEvent, QKeyEvent and
QWheelEvent respectively and expose the Device. The Device is only passed
around as a forward declared pointer, so even if compiled without libinput
support, it should still compile.
Event handlers which need to get access to the Device can now just cast
the event pointer to the custom class and access it. This can be used in
future to handle device specific key codes, etc.
As we don't have a proper event classes for touch events the event
handlers do not yet have access to the Device. Here the internal API
needs to be adjusted in future.
REPOSITORY
rKWIN KWin
BRANCH
custom-input-events
REVISION DETAIL
https://phabricator.kde.org/D1667
AFFECTED FILES
CMakeLists.txt
autotests/libinput/CMakeLists.txt
autotests/libinput/input_event_test.cpp
input.cpp
input_event.cpp
input_event.h
keyboard_input.cpp
keyboard_input.h
libinput/connection.cpp
libinput/connection.h
pointer_input.cpp
pointer_input.h
tests/libinputtest.cpp
touch_input.cpp
touch_input.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: graesslin, Plasma
Cc: plasma-devel, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160524/003e80ae/attachment.html>
More information about the Plasma-devel
mailing list