[PATCH libinput 09/11] touchpad: reset the touch state when edge scrolling is stopped

Peter Hutterer peter.hutterer at who-t.net
Mon May 25 15:52:56 PDT 2015


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-mt-touchpad-edge-scroll.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c
index 9bf3f0c..f7eae9e 100644
--- a/src/evdev-mt-touchpad-edge-scroll.c
+++ b/src/evdev-mt-touchpad-edge-scroll.c
@@ -438,6 +438,10 @@ tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time)
 					    &zero,
 					    &zero_discrete);
 			t->scroll.direction = -1;
+			/* reset touch to area state, avoids loading the
+			 * state machine with special case handling */
+			t->scroll.edge = EDGE_NONE;
+			t->scroll.edge_state = EDGE_SCROLL_TOUCH_STATE_AREA;
 		}
 	}
 }
-- 
2.4.1



More information about the wayland-devel mailing list