[platformx/x11] Fix touch events for internal Qt windows
ClosedPublic

Authored by graesslin on Apr 23 2017, 1:05 PM.

Details

Summary

To have touch events working we need to do memory layout changes on the
xcb events. This is fine for identifying the touch events which should
trigger the screen edge. But when passed on to Qt to have QtQuick windows
(e.g. Alt+Tab) handle the touch events, this results in a problem:
Qt itself does also the memory movement and then the movement is double
and touch events break.

To prevent this problem an RAII class is added which moves the memory in
the ctor and moves it back in the dtor. So during KWin's processing it
has the right memory layout and later on in Qt's processing it has the
proper "wrong" layout which Qt can fix again.

Test Plan

Touch events in Alt+Tab work

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 created this revision.Apr 23 2017, 1:05 PM
Restricted Application added a project: KWin. · View Herald TranscriptApr 23 2017, 1:05 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript

ping! This one is super important for enabling touch screen edges on X11!

davidedmundson accepted this revision.Apr 29 2017, 1:10 PM
This revision is now accepted and ready to land.Apr 29 2017, 1:10 PM
This revision was automatically updated to reflect the committed changes.