Commit Graph

2 Commits (b19c3c1c8e52870b704ae1eb2207721f87dc35dd)

Author SHA1 Message Date
Jesse Pullinen 0eba3f3c18 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
2017-09-19 07:11:40 +03:00
Martin Gräßlin 1e564989c9 [autotest/libinput] Add a mocked test for Libinput::TouchEvent 2016-05-31 10:14:28 +02:00