Diffusion KWin 0eba3f3c18c2

Fix TouchEvent::id() returning -1, fixes a crash

Authored by jessep on Sep 17 2017, 11:44 AM.

Description

Fix TouchEvent::id() returning -1, fixes a crash

Summary:
Libinput returns -1 when calling libinput_event_touch_get_slot on an event
from a single-touch touchscreen. The returned value is used in
DecorationEventFilter to determine the touch which is acting on it. The value -1
is used to signify that the decoration is not being acted on. Thus when
releasing the touch, it checks whether it was being dragged, and as it thinks
it isn't, it doesn't handle it and the decoration is still being dragged.
Clicking on the decoration then crashes kwin.

Test Plan: Move a window by dragging the decoration with a single-touch touchscreen.

Reviewers: KWin, graesslin

Reviewed By: KWin, graesslin

Subscribers: graesslin, kwin, KWin

Tags: KWin

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

Details

Committed
jessepSep 19 2017, 4:11 AM
Reviewer
KWin
Differential Revision
D7854: Fix TouchEvent::id() returning -1, fixes a crash
Parents
R108:a5e523caf03b: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown