[PATCH libinput 4/6] touchpad: Stop scrolling on a button click / tap

Hans de Goede hdegoede at redhat.com
Fri May 23 07:06:25 PDT 2014


On a button click / tap the scrolling event handler no longer gets called,
ensure that any in progress scrolling is stopped.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 src/evdev-mt-touchpad.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index ed668ee..f28cd13 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -549,11 +549,15 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time)
 	struct tp_touch *t = tp_current_touch(tp);
 	double dx, dy;
 
-	if (tp_post_button_events(tp, time) != 0)
+	if (tp_post_button_events(tp, time) != 0) {
+		tp_stop_scroll_events(tp, time);
 		return;
+	}
 
-	if (tp_tap_handle_state(tp, time) != 0)
+	if (tp_tap_handle_state(tp, time) != 0) {
+		tp_stop_scroll_events(tp, time);
 		return;
+	}
 
 	if (tp_post_scroll_events(tp, time) != 0)
 		return;
-- 
1.9.3



More information about the wayland-devel mailing list