Add support for touch events in the Effect system
ClosedPublic

Authored by graesslin on Aug 15 2016, 1:53 PM.

Details

Summary

The Effect class is extended by three new virtual methods:

  • touchDown
  • touchMotion
  • touchUp

The methods return a boolean value so that the events can be filtered
out. E.g. an effect which has also a mouse grab installed wants to
filter out all events, other effects don't need the events exclusively.

This is a difference to how e.g. keyboard and pointer events are handled.
But is more close to how KWin's internal input event passing works and
makes it easier to get touch event: one does not explicitly has to grab
the events. It's also closer to Wayland where all input events are
available.

As a first example the Present Windows effect is adjusted and allows to
activate windows through the touch screen. As much code as possible is
shared with pointer input.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 5934.Aug 15 2016, 1:53 PM
graesslin retitled this revision from to Add support for touch events in the Effect system.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptAug 15 2016, 1:53 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
mart accepted this revision.Aug 15 2016, 2:28 PM
mart added a reviewer: mart.
mart added a subscriber: mart.

as discussed on irc, i would have loved if it was exposed with qtouchevents (or a qtouchevent-like api
however, as this seems to be really overcomplicated to do, this lower level api is fine as well

This revision is now accepted and ready to land.Aug 15 2016, 2:28 PM
This revision was automatically updated to reflect the committed changes.