Skip to content

Commit

Permalink
Hacky way to allow applications to stop kinetic scrolling when two fi…
Browse files Browse the repository at this point in the history
…ngers are placed on touchpad
  • Loading branch information
ponyfleisch committed Jun 13, 2020
1 parent 9b3e0e8 commit 0871ac8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/evdev-mt-touchpad-gestures.c
Expand Up @@ -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);
Expand Down

0 comments on commit 0871ac8

Please sign in to comment.