summaryrefslogtreecommitdiff
path: root/test/test-touchpad-tap.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-02-28 11:38:12 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-03-01 12:24:19 +1000
commit3979b9e16a5ed141506d95f80ddfd7b94651dcfa (patch)
treea959adc279f0db4b42294ab439c6b6201de18c2b /test/test-touchpad-tap.c
parent85e5d80cd41e0921f4b77248ff521e1cdad8e9b2 (diff)
downloadlibinput-3979b9e16a5ed141506d95f80ddfd7b94651dcfa.tar.gz
touchpad: don't end below-threshold pressure touches if nfake_fingers > nslots
If we have more BTN_TOOL_*TAP fingers down than we have slots, ignore any below-threshold pressure changes on the slots. When a touchpad only detects two touches, guessing whether the third touch has sufficient pressure is unreliable. Instead, always assume that all touches have sufficient pressure when we exceed the slot number. Exception: if all real fingers are below the pressure threshold, the fake fingers are ignored too. Related to https://bugs.freedesktop.org/show_bug.cgi?id=105258 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/test-touchpad-tap.c')
-rw-r--r--test/test-touchpad-tap.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/test-touchpad-tap.c b/test/test-touchpad-tap.c
index 948be965..aa1ea0f5 100644
--- a/test/test-touchpad-tap.c
+++ b/test/test-touchpad-tap.c
@@ -1632,10 +1632,19 @@ START_TEST(touchpad_3fg_tap_pressure_btntool)
litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1);
litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 0);
litest_pop_event_frame(dev);
- litest_assert_empty_queue(li);
litest_touch_up(dev, 0);
litest_touch_up(dev, 1);
+ libinput_dispatch(li);
+ litest_timeout_tap();
+ libinput_dispatch(li);
+
+ litest_assert_button_event(li,
+ BTN_MIDDLE,
+ LIBINPUT_BUTTON_STATE_PRESSED);
+ litest_assert_button_event(li,
+ BTN_MIDDLE,
+ LIBINPUT_BUTTON_STATE_RELEASED);
}
END_TEST