summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-08-22 16:06:59 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-08-23 07:07:55 +1000
commitb1a811ee521dc56ed5d1c789251fad245b758a80 (patch)
treebd2476e915ad6f8c7677191ef1e4d9f9c1ac6491 /src
parentb02acd346bbfac2d95f71a2399219c93ebed0ad7 (diff)
touchpad: reset the edge scroll state on touch up if edge scroll is disabled
If a touch was down (and up again) before the device was switched to edge scrolling, libinput reported an error message: litest error: libinput bug: unexpected scroll event 0 in area state While edge scrolling was disabled, any new touch would be set to the area state but it was never reset on touch release. https://bugs.freedesktop.org/show_bug.cgi?id=97425 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-mt-touchpad-edge-scroll.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c
index 081d2c4..1d30bca 100644
--- a/src/evdev-mt-touchpad-edge-scroll.c
+++ b/src/evdev-mt-touchpad-edge-scroll.c
@@ -338,6 +338,9 @@ tp_edge_scroll_handle_state(struct tp_dispatch *tp, uint64_t time)
if (t->state == TOUCH_BEGIN)
t->scroll.edge_state =
EDGE_SCROLL_TOUCH_STATE_AREA;
+ else if (t->state == TOUCH_END)
+ t->scroll.edge_state =
+ EDGE_SCROLL_TOUCH_STATE_NONE;
}
return;
}