mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-04-18 08:30:44 +02:00
test: enable tapping before verifying correct tap events
These tests make sure we don't get tapping events in certain situations (finger movement, timeouts, ...). Tapping must be enabled for that to be a valid test. The tests can't work on semi-mt devices because we can't end slots independently. Disable the tests there. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
8b633f9de3
commit
f8fae70d0c
1 changed files with 9 additions and 2 deletions
|
|
@ -508,6 +508,8 @@ START_TEST(touchpad_no_2fg_tap_after_move)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
libinput_device_config_tap_set_enabled(dev->libinput_device,
|
||||
LIBINPUT_CONFIG_TAP_ENABLED);
|
||||
litest_drain_events(dev->libinput);
|
||||
|
||||
/* one finger down, move past threshold,
|
||||
|
|
@ -530,6 +532,8 @@ START_TEST(touchpad_no_2fg_tap_after_timeout)
|
|||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
|
||||
libinput_device_config_tap_set_enabled(dev->libinput_device,
|
||||
LIBINPUT_CONFIG_TAP_ENABLED);
|
||||
litest_drain_events(dev->libinput);
|
||||
|
||||
/* one finger down, wait past tap timeout,
|
||||
|
|
@ -555,6 +559,9 @@ START_TEST(touchpad_no_first_fg_tap_after_move)
|
|||
struct libinput *li = dev->libinput;
|
||||
struct libinput_event *event;
|
||||
|
||||
libinput_device_config_tap_set_enabled(dev->libinput_device,
|
||||
LIBINPUT_CONFIG_TAP_ENABLED);
|
||||
|
||||
litest_drain_events(dev->libinput);
|
||||
|
||||
/* one finger down, second finger down,
|
||||
|
|
@ -3344,8 +3351,8 @@ int main(int argc, char **argv) {
|
|||
litest_add("touchpad:tap", touchpad_2fg_tap_click, LITEST_TOUCHPAD|LITEST_BUTTON, LITEST_SINGLE_TOUCH|LITEST_CLICKPAD);
|
||||
|
||||
litest_add("touchpad:tap", touchpad_2fg_tap_click_apple, LITEST_APPLE_CLICKPAD, LITEST_ANY);
|
||||
litest_add("touchpad:tap", touchpad_no_2fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||
litest_add("touchpad:tap", touchpad_no_2fg_tap_after_timeout, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||
litest_add("touchpad:tap", touchpad_no_2fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT);
|
||||
litest_add("touchpad:tap", touchpad_no_2fg_tap_after_timeout, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH|LITEST_SEMI_MT);
|
||||
litest_add("touchpad:tap", touchpad_no_first_fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||
litest_add("touchpad:tap", touchpad_no_first_fg_tap_after_move, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||
litest_add("touchpad:tap", touchpad_3fg_tap_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue