Diffusion KWin 69cbb40903ec

Pass LibInput::Device* through the event handlers

Authored by graesslin on May 24 2016, 8:57 AM.

Description

Pass LibInput::Device* through the event handlers

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.

Reviewers: Plasma

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D1667

Details

Committed
graesslinMay 30 2016, 1:26 PM
Differential Revision
D1667: Pass LibInput::Device* through the event handlers
Parents
R108:6d090cd263bb: [libinput] Add the Device to Event
Branches
Unknown
Tags
Unknown