mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-23 17:19:10 +00:00
Lift canceled touch inputs
If a touch input gets turned into a palm (by setting ABS_MT_TOOL_TYPE to MT_TOOL_PALM), libinput will emit a cancel event instead of the normal up event. The xorg wrapper needs to be able to handle a canceled touch and lift it, otherwise these inputs will never get lifted and will stick around forever. Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
This commit is contained in:
@@ -1698,6 +1698,7 @@ xf86libinput_handle_touch(InputInfoPtr pInfo,
|
||||
touchids[slot] = next_touchid++;
|
||||
break;
|
||||
case LIBINPUT_EVENT_TOUCH_UP:
|
||||
case LIBINPUT_EVENT_TOUCH_CANCEL:
|
||||
type = XI_TouchEnd;
|
||||
break;
|
||||
case LIBINPUT_EVENT_TOUCH_MOTION:
|
||||
@@ -1709,7 +1710,7 @@ xf86libinput_handle_touch(InputInfoPtr pInfo,
|
||||
|
||||
valuator_mask_zero(m);
|
||||
|
||||
if (event_type != LIBINPUT_EVENT_TOUCH_UP) {
|
||||
if (type != XI_TouchEnd) {
|
||||
val = libinput_event_touch_get_x_transformed(event, TOUCH_AXIS_MAX);
|
||||
valuator_mask_set_double(m, 0, val);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user