touchpad: reset the touch state when edge scrolling is stopped
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 25 May 2015 01:36:34 +0000 (11:36 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 27 May 2015 07:38:25 +0000 (17:38 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
src/evdev-mt-touchpad-edge-scroll.c

index 9bf3f0c038e9d408b919fc15b57ee22c247859c4..f7eae9e9298cb1671ad17ea594dcaed262506c96 100644 (file)
@@ -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;
                }
        }
 }