summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-01-08 10:39:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-01-09 13:47:42 +1000
commitf5a9e38c90380741adaf3ae38642d30f7564e922 (patch)
tree7b0c60c00b280a4feb3f817685e5ec5a88909639 /test
parent932911d22932c61b682e96f4b469fbe547abe8a9 (diff)
touchpad: don't disable the hysteresis unless a finger is down
On the very first event, the last_motion_time set by tp_begin_touch is not yet set because we are called before the pressure-based touch detection takes effect. And any event timestamp is more than 80ms after a zero timestamp, causing the hysteresis to always be disabled. https://bugs.freedesktop.org/show_bug.cgi?id=98839#c74 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r--test/test-touchpad.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test-touchpad.c b/test/test-touchpad.c
index 808c0639..836640b7 100644
--- a/test/test-touchpad.c
+++ b/test/test-touchpad.c
@@ -642,6 +642,10 @@ START_TEST(touchpad_edge_scroll_timeout)
/* move 0.5mm, enough to load up the motion history, but less than
* the scroll threshold of 2mm */
litest_touch_down(dev, 0, 99, 20);
+ libinput_dispatch(li);
+ litest_timeout_hysteresis();
+ libinput_dispatch(li);
+
litest_touch_move_to(dev, 0, 99, 20, 99, 20 + mm/2, 8, 0);
libinput_dispatch(li);
litest_assert_empty_queue(li);