From 0871ac80a6529d39ebd3f56ea3092a2cb7bd93ce Mon Sep 17 00:00:00 2001 From: Claudio Mettler Date: Sat, 13 Jun 2020 14:17:41 +0800 Subject: [PATCH] Hacky way to allow applications to stop kinetic scrolling when two fingers are placed on touchpad --- src/evdev-mt-touchpad-gestures.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index 6c63183b..5dc48fa9 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -699,6 +699,14 @@ tp_gesture_post_gesture(struct tp_dispatch *tp, uint64_t time) tp->gesture.state = tp_gesture_handle_state_unknown(tp, time); + if (tp->gesture.state == GESTURE_STATE_UNKNOWN && oldstate == GESTURE_STATE_NONE) { + struct normalized_coords delta = { 0.1, 0.1 }; + evdev_post_scroll(tp->device, + time, + LIBINPUT_POINTER_AXIS_SOURCE_FINGER, + &delta); + } + if (tp->gesture.state == GESTURE_STATE_SCROLL) tp->gesture.state = tp_gesture_handle_state_scroll(tp, time);