From 7768d7d981b8ac3917bc9d22fa1aac4756ab60ef Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 28 Aug 2018 09:16:52 +1000 Subject: [PATCH] test: drop the sleep_ms argument This forces events for every ~10ms now. If we want a slower movement, we need more steps - just like a real touchpad does it. Cocinelle spatch files were variants of: @@ expression A, B, C, D, E, F, G, H, I, J, K; @@ - litest_touch_move_two_touches(A, B, C, D, E, F, G, H, I) + litest_touch_move_two_touches(A, B, C, D, E, F, G, H) The only test that needed a real fix was touchpad_no_palm_detect_2fg_scroll, it used 12ms before, now it's using 10ms so on the bcm5974 touchpad the second finger was a speed-thumb. Increasing the events and thus slowing down the pointer means it's a normal finger and the test succeeds again. Signed-off-by: Peter Hutterer --- test/litest.c | 29 +-- test/litest.h | 12 +- test/test-device.c | 12 +- test/test-gestures.c | 44 +--- test/test-switch.c | 34 +-- test/test-tablet.c | 38 +-- test/test-touch.c | 66 ++--- test/test-touchpad-buttons.c | 42 ++-- test/test-touchpad-tap.c | 90 +++---- test/test-touchpad.c | 468 ++++++++++++++++------------------- test/test-trackpoint.c | 12 +- 11 files changed, 394 insertions(+), 453 deletions(-) diff --git a/test/litest.c b/test/litest.c index 0162ae60..1545c0d0 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1992,13 +1992,13 @@ litest_touch_move_to(struct litest_device *d, unsigned int slot, double x_from, double y_from, double x_to, double y_to, - int steps, int sleep_ms) + int steps) { litest_touch_move_to_extended(d, slot, x_from, y_from, x_to, y_to, NULL, - steps, sleep_ms); + steps); } void @@ -2007,10 +2007,9 @@ litest_touch_move_to_extended(struct litest_device *d, double x_from, double y_from, double x_to, double y_to, struct axis_replacement *axes, - int steps, int sleep_ms) + int steps) { - if (sleep_ms == 0) - sleep_ms = 10; + int sleep_ms = 10; for (int i = 1; i < steps; i++) { litest_touch_move_extended(d, slot, @@ -2105,10 +2104,9 @@ litest_touch_move_two_touches(struct litest_device *d, double x0, double y0, double x1, double y1, double dx, double dy, - int steps, int sleep_ms) + int steps) { - if (sleep_ms == 0) - sleep_ms = 10; + int sleep_ms = 10; for (int i = 1; i < steps; i++) { litest_push_event_frame(d); @@ -2133,10 +2131,9 @@ litest_touch_move_three_touches(struct litest_device *d, double x1, double y1, double x2, double y2, double dx, double dy, - int steps, int sleep_ms) + int steps) { - if (sleep_ms == 0) - sleep_ms = 10; + int sleep_ms = 10; for (int i = 0; i < steps - 1; i++) { litest_touch_move(d, 0, x0 + dx / steps * i, @@ -2220,10 +2217,9 @@ litest_hover_move_to(struct litest_device *d, unsigned int slot, double x_from, double y_from, double x_to, double y_to, - int steps, int sleep_ms) + int steps) { - if (sleep_ms == 0) - sleep_ms = 10; + int sleep_ms = 10; for (int i = 0; i < steps - 1; i++) { litest_hover_move(d, slot, @@ -2241,10 +2237,9 @@ litest_hover_move_two_touches(struct litest_device *d, double x0, double y0, double x1, double y1, double dx, double dy, - int steps, int sleep_ms) + int steps) { - if (sleep_ms == 0) - sleep_ms = 10; + int sleep_ms = 10; for (int i = 0; i < steps - 1; i++) { litest_push_event_frame(d); diff --git a/test/litest.h b/test/litest.h index 13547f6d..7b525c7a 100644 --- a/test/litest.h +++ b/test/litest.h @@ -543,7 +543,7 @@ litest_touch_move_to(struct litest_device *d, unsigned int slot, double x_from, double y_from, double x_to, double y_to, - int steps, int sleep_ms); + int steps); void litest_touch_move_to_extended(struct litest_device *d, @@ -551,14 +551,14 @@ litest_touch_move_to_extended(struct litest_device *d, double x_from, double y_from, double x_to, double y_to, struct axis_replacement *axes, - int steps, int sleep_ms); + int steps); void litest_touch_move_two_touches(struct litest_device *d, double x0, double y0, double x1, double y1, double dx, double dy, - int steps, int sleep_ms); + int steps); void litest_touch_move_three_touches(struct litest_device *d, @@ -566,7 +566,7 @@ litest_touch_move_three_touches(struct litest_device *d, double x1, double y1, double x2, double y2, double dx, double dy, - int steps, int sleep_ms); + int steps); void litest_tablet_proximity_in(struct litest_device *d, @@ -618,14 +618,14 @@ litest_hover_move_to(struct litest_device *d, unsigned int slot, double x_from, double y_from, double x_to, double y_to, - int steps, int sleep_ms); + int steps); void litest_hover_move_two_touches(struct litest_device *d, double x0, double y0, double x1, double y1, double dx, double dy, - int steps, int sleep_ms); + int steps); void litest_button_click_debounced(struct litest_device *d, diff --git a/test/test-device.c b/test/test-device.c index c072e83e..e7233158 100644 --- a/test/test-device.c +++ b/test/test-device.c @@ -198,7 +198,7 @@ START_TEST(device_disable_touchpad) litest_assert_empty_queue(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -230,7 +230,7 @@ START_TEST(device_disable_touch) litest_assert_empty_queue(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -254,7 +254,7 @@ START_TEST(device_disable_touch_during_touch) device = dev->libinput_device; litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10); litest_drain_events(li); status = libinput_device_config_send_events_set_mode(device, @@ -273,11 +273,11 @@ START_TEST(device_disable_touch_during_touch) litest_assert_empty_queue(li); - litest_touch_move_to(dev, 0, 90, 90, 50, 50, 10, 0); + litest_touch_move_to(dev, 0, 90, 90, 50, 50, 10); litest_touch_up(dev, 0); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1377,7 +1377,7 @@ START_TEST(device_quirks_apple_magicmouse) /* ensure we get no events from the touch */ litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 80, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); } diff --git a/test/test-gestures.c b/test/test-gestures.c index 25998797..e1b7b2d4 100644 --- a/test/test-gestures.c +++ b/test/test-gestures.c @@ -85,12 +85,8 @@ START_TEST(gestures_swipe_3fg) litest_touch_down(dev, 1, 50, 40); litest_touch_down(dev, 2, 60, 40); libinput_dispatch(li); - litest_touch_move_three_touches(dev, - 40, 40, - 50, 40, - 60, 40, - dir_x, dir_y, - 10, 0); + litest_touch_move_three_touches(dev, 40, 40, 50, 40, 60, 40, dir_x, + dir_y, 10); libinput_dispatch(li); event = libinput_get_event(li); @@ -193,11 +189,7 @@ START_TEST(gestures_swipe_3fg_btntool) litest_event(dev, EV_SYN, SYN_REPORT, 0); libinput_dispatch(li); - litest_touch_move_two_touches(dev, - 40, 40, - 50, 40, - dir_x, dir_y, - 10, 0); + litest_touch_move_two_touches(dev, 40, 40, 50, 40, dir_x, dir_y, 10); libinput_dispatch(li); event = libinput_get_event(li); @@ -427,11 +419,7 @@ START_TEST(gestures_swipe_4fg_btntool) litest_event(dev, EV_SYN, SYN_REPORT, 0); libinput_dispatch(li); - litest_touch_move_two_touches(dev, - 40, 40, - 50, 40, - dir_x, dir_y, - 10, 0); + litest_touch_move_two_touches(dev, 40, 40, 50, 40, dir_x, dir_y, 10); libinput_dispatch(li); event = libinput_get_event(li); @@ -536,11 +524,11 @@ START_TEST(gestures_pinch_vertical_position) nfingers); libinput_event_destroy(event); - litest_touch_move_to(dev, 0, 40, 30.5, 40, 36, 5, 0); - litest_touch_move_to(dev, 1, 50, 70.5, 50, 76, 5, 0); - litest_touch_move_to(dev, 2, 60, 70.5, 60, 76, 5, 0); + litest_touch_move_to(dev, 0, 40, 30.5, 40, 36, 5); + litest_touch_move_to(dev, 1, 50, 70.5, 50, 76, 5); + litest_touch_move_to(dev, 2, 60, 70.5, 60, 76, 5); if (nfingers > 3) - litest_touch_move_to(dev, 3, 70, 70.5, 60, 76, 5, 0); + litest_touch_move_to(dev, 3, 70, 70.5, 60, 76, 5); libinput_dispatch(li); litest_assert_only_typed_events(li, @@ -981,12 +969,8 @@ START_TEST(gestures_time_usec) litest_touch_down(dev, 1, 50, 40); litest_touch_down(dev, 2, 60, 40); libinput_dispatch(li); - litest_touch_move_three_touches(dev, - 40, 40, - 50, 40, - 60, 40, - 0, 30, - 30, 0); + litest_touch_move_three_touches(dev, 40, 40, 50, 40, 60, 40, 0, 30, + 30); libinput_dispatch(li); event = libinput_get_event(li); @@ -1017,11 +1001,7 @@ START_TEST(gestures_3fg_buttonarea_scroll) /* third finger in btnarea */ litest_touch_down(dev, 2, 50, 99); libinput_dispatch(li); - litest_touch_move_two_touches(dev, - 40, 20, - 30, 20, - 0, 40, - 10, 0); + litest_touch_move_two_touches(dev, 40, 20, 30, 20, 0, 40, 10); litest_touch_up(dev, 0); litest_touch_up(dev, 1); @@ -1049,7 +1029,7 @@ START_TEST(gestures_3fg_buttonarea_scroll_btntool) litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 1); litest_event(dev, EV_SYN, SYN_REPORT, 0); libinput_dispatch(li); - litest_touch_move_to(dev, 1, 30, 20, 30, 70, 10, 0); + litest_touch_move_to(dev, 1, 30, 20, 30, 70, 10); litest_touch_up(dev, 1); libinput_dispatch(li); diff --git a/test/test-switch.c b/test/test-switch.c index c7431bf5..5af9ac33 100644 --- a/test/test-switch.c +++ b/test/test-switch.c @@ -260,7 +260,7 @@ START_TEST(switch_disable_touchpad) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -269,7 +269,7 @@ START_TEST(switch_disable_touchpad) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -292,13 +292,13 @@ START_TEST(switch_disable_touchpad_during_touch) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); - litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5, 0); + litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -330,11 +330,11 @@ START_TEST(switch_disable_touchpad_edge_scroll) libinput_dispatch(li); litest_assert_empty_queue(li); - litest_touch_move_to(touchpad, 0, 99, 20, 99, 80, 60, 10); + litest_touch_move_to(touchpad, 0, 99, 20, 99, 80, 60); libinput_dispatch(li); litest_assert_empty_queue(li); - litest_touch_move_to(touchpad, 0, 99, 80, 99, 20, 60, 10); + litest_touch_move_to(touchpad, 0, 99, 80, 99, 20, 60); litest_touch_up(touchpad, 0); libinput_dispatch(li); litest_assert_empty_queue(li); @@ -362,7 +362,7 @@ START_TEST(switch_disable_touchpad_edge_scroll_interrupt) litest_touch_down(touchpad, 0, 99, 20); libinput_dispatch(li); litest_timeout_edgescroll(); - litest_touch_move_to(touchpad, 0, 99, 20, 99, 30, 10, 10); + litest_touch_move_to(touchpad, 0, 99, 20, 99, 30, 10); libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); @@ -400,7 +400,7 @@ START_TEST(switch_disable_touchpad_already_open) /* default: switch is off - motion events */ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -409,7 +409,7 @@ START_TEST(switch_disable_touchpad_already_open) litest_assert_empty_queue(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -438,7 +438,7 @@ START_TEST(switch_dont_resume_disabled_touchpad) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -447,7 +447,7 @@ START_TEST(switch_dont_resume_disabled_touchpad) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -473,7 +473,7 @@ START_TEST(switch_dont_resume_disabled_touchpad_external_mouse) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -482,7 +482,7 @@ START_TEST(switch_dont_resume_disabled_touchpad_external_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -491,7 +491,7 @@ START_TEST(switch_dont_resume_disabled_touchpad_external_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -567,7 +567,7 @@ START_TEST(lid_open_on_key_touchpad_enabled) litest_timeout_dwt_long(); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 70, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 70, 10); litest_touch_up(touchpad, 0); libinput_dispatch(li); @@ -847,7 +847,7 @@ START_TEST(tablet_mode_disable_touchpad_on_init) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -857,7 +857,7 @@ START_TEST(tablet_mode_disable_touchpad_on_init) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); diff --git a/test/test-tablet.c b/test/test-tablet.c index 45375113..31c5989d 100644 --- a/test/test-tablet.c +++ b/test/test-tablet.c @@ -4100,7 +4100,7 @@ touch_arbitration(struct litest_device *dev, litest_drain_events(li); litest_touch_down(finger, 0, 30, 30); - litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10); litest_assert_empty_queue(li); litest_tablet_motion(dev, 10, 10, axes); @@ -4115,13 +4115,13 @@ touch_arbitration(struct litest_device *dev, libinput_dispatch(li); /* finger still down */ - litest_touch_move_to(finger, 0, 80, 80, 30, 30, 10, 1); + litest_touch_move_to(finger, 0, 80, 80, 30, 30, 10); litest_touch_up(finger, 0); litest_assert_empty_queue(li); /* lift finger, expect expect events */ litest_touch_down(finger, 0, 30, 30); - litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10); litest_touch_up(finger, 0); libinput_dispatch(li); @@ -4163,18 +4163,18 @@ touch_arbitration_stop_touch(struct litest_device *dev, finger = litest_add_device(li, other); litest_touch_down(finger, 0, 30, 30); - litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10); litest_tablet_proximity_in(dev, 10, 10, axes); litest_tablet_motion(dev, 10, 10, axes); litest_tablet_motion(dev, 20, 40, axes); litest_drain_events(li); - litest_touch_move_to(finger, 0, 80, 80, 30, 30, 10, 1); + litest_touch_move_to(finger, 0, 80, 80, 30, 30, 10); /* start another finger to make sure that one doesn't send events either */ litest_touch_down(finger, 1, 30, 30); - litest_touch_move_to(finger, 1, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 1, 30, 30, 80, 80, 10); litest_assert_empty_queue(li); litest_tablet_motion(dev, 10, 10, axes); @@ -4185,12 +4185,12 @@ touch_arbitration_stop_touch(struct litest_device *dev, litest_drain_events(li); /* Finger needs to be lifted for events to happen*/ - litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10); litest_assert_empty_queue(li); - litest_touch_move_to(finger, 1, 80, 80, 30, 30, 10, 1); + litest_touch_move_to(finger, 1, 80, 80, 30, 30, 10); litest_assert_empty_queue(li); litest_touch_up(finger, 0); - litest_touch_move_to(finger, 1, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 1, 30, 30, 80, 80, 10); litest_assert_empty_queue(li); litest_touch_up(finger, 1); libinput_dispatch(li); @@ -4199,7 +4199,7 @@ touch_arbitration_stop_touch(struct litest_device *dev, libinput_dispatch(li); litest_touch_down(finger, 0, 30, 30); - litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10); litest_touch_up(finger, 0); libinput_dispatch(li); @@ -4260,7 +4260,7 @@ touch_arbitration_suspend_touch(struct litest_device *dev, litest_drain_events(li); litest_touch_down(dev, 0, 30, 30); - litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -4274,13 +4274,13 @@ touch_arbitration_suspend_touch(struct litest_device *dev, libinput_dispatch(li); litest_touch_down(dev, 0, 30, 30); - litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); /* Touch device is still disabled */ litest_touch_down(dev, 0, 30, 30); - litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -4290,7 +4290,7 @@ touch_arbitration_suspend_touch(struct litest_device *dev, ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); litest_touch_down(dev, 0, 30, 30); - litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -4332,7 +4332,7 @@ touch_arbitration_remove_touch(struct litest_device *dev, finger = litest_add_device(li, other); litest_touch_down(finger, 0, 30, 30); - litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10); litest_tablet_proximity_in(dev, 10, 10, axes); litest_drain_events(li); @@ -4385,7 +4385,7 @@ touch_arbitration_remove_tablet(struct litest_device *dev, litest_drain_events(li); litest_touch_down(dev, 0, 30, 30); - litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10); litest_assert_empty_queue(li); litest_delete_device(tablet); @@ -4397,12 +4397,12 @@ touch_arbitration_remove_tablet(struct litest_device *dev, libinput_dispatch(li); /* Touch is still down, don't enable */ - litest_touch_move_to(dev, 0, 80, 80, 30, 30, 10, 1); + litest_touch_move_to(dev, 0, 80, 80, 30, 30, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); litest_touch_down(dev, 0, 30, 30); - litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(dev, 0, 30, 30, 80, 80, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -4453,7 +4453,7 @@ START_TEST(intuos_touch_arbitration_keep_ignoring) /* a touch during pen interaction stays a palm after the pen lifts. */ - litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(finger, 0, 30, 30, 80, 80, 10); litest_touch_up(finger, 0); libinput_dispatch(li); diff --git a/test/test-touch.c b/test/test-touch.c index 3388d5dd..dbfbc9c1 100644 --- a/test/test-touch.c +++ b/test/test-touch.c @@ -159,11 +159,11 @@ START_TEST(touch_seat_slot) litest_touch_down(dev1, 1, 60, 50); touch_assert_seat_slot(li, LIBINPUT_EVENT_TOUCH_DOWN, 1, 3); - litest_touch_move_to(dev1, 0, 50, 50, 60, 70, 10, 0); + litest_touch_move_to(dev1, 0, 50, 50, 60, 70, 10); touch_assert_seat_slot(li, LIBINPUT_EVENT_TOUCH_MOTION, 0, 0); litest_drain_events(li); - litest_touch_move_to(dev2, 1, 50, 50, 60, 70, 10, 0); + litest_touch_move_to(dev2, 1, 50, 50, 60, 70, 10); touch_assert_seat_slot(li, LIBINPUT_EVENT_TOUCH_MOTION, 1, 2); litest_drain_events(li); @@ -619,13 +619,13 @@ START_TEST(fake_mt_no_touch_events) litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 5, 10); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 5); litest_touch_up(dev, 0); litest_touch_down(dev, 0, 50, 50); litest_touch_down(dev, 1, 70, 70); - litest_touch_move_to(dev, 0, 50, 50, 90, 40, 10, 10); - litest_touch_move_to(dev, 0, 70, 70, 40, 50, 10, 10); + litest_touch_move_to(dev, 0, 50, 50, 90, 40, 10); + litest_touch_move_to(dev, 0, 70, 70, 40, 50, 10); litest_touch_up(dev, 0); litest_touch_up(dev, 1); @@ -673,7 +673,7 @@ START_TEST(touch_protocol_a_touch) litest_is_touch_event(ev, LIBINPUT_EVENT_TOUCH_FRAME); libinput_event_destroy(ev); - litest_touch_move_to(dev, 0, 10, 90, 90, 10, 20, 1); + litest_touch_move_to(dev, 0, 10, 90, 90, 10, 20); libinput_dispatch(li); while ((ev = libinput_get_event(li))) { @@ -736,8 +736,8 @@ START_TEST(touch_protocol_a_2fg_touch) for (pos = 10; pos < 100; pos += 10) { litest_push_event_frame(dev); - litest_touch_move_to(dev, 0, pos, 100 - pos, pos, 100 - pos, 1, 1); - litest_touch_move_to(dev, 0, 100 - pos, pos, 100 - pos, pos, 1, 1); + litest_touch_move_to(dev, 0, pos, 100 - pos, pos, 100 - pos, 1); + litest_touch_move_to(dev, 0, 100 - pos, pos, 100 - pos, pos, 1); litest_pop_event_frame(dev); libinput_dispatch(li); @@ -922,7 +922,7 @@ START_TEST(touch_release_on_unplug) litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_drain_events(li); /* Touch is still down when device is removed, espect a release */ @@ -1080,14 +1080,14 @@ START_TEST(touch_palm_detect_tool_palm) return; litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_drain_events(li); - litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10); libinput_dispatch(li); litest_assert_touch_cancel(li); - litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1107,18 +1107,18 @@ START_TEST(touch_palm_detect_tool_palm_on_off) return; litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_drain_events(li); - litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10); libinput_dispatch(li); litest_assert_touch_cancel(li); - litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10); litest_assert_empty_queue(li); litest_axis_set_value(axes, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER); - litest_touch_move_to_extended(dev, 0, 50, 40, 70, 70, axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 40, 70, 70, axes, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1138,8 +1138,8 @@ START_TEST(touch_palm_detect_tool_palm_keep_type) return; litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); - litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); + litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10); litest_touch_up(dev, 0); litest_drain_events(li); @@ -1149,7 +1149,7 @@ START_TEST(touch_palm_detect_tool_palm_keep_type) /* Test the revert to finger case too */ litest_axis_set_value(axes, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER); - litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1170,14 +1170,14 @@ START_TEST(touch_palm_detect_tool_palm_2fg) litest_touch_down(dev, 0, 50, 50); litest_touch_down(dev, 1, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_drain_events(li); - litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10); libinput_dispatch(li); litest_assert_touch_cancel(li); - litest_touch_move_to(dev, 1, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 1, 50, 50, 70, 70, 10); libinput_dispatch(li); litest_assert_touch_motion_frame(li); @@ -1185,7 +1185,7 @@ START_TEST(touch_palm_detect_tool_palm_2fg) libinput_dispatch(li); litest_assert_touch_up_frame(li); - litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1206,22 +1206,22 @@ START_TEST(touch_palm_detect_tool_palm_on_off_2fg) litest_touch_down(dev, 0, 50, 50); litest_touch_down(dev, 1, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_drain_events(li); - litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10); libinput_dispatch(li); litest_assert_touch_cancel(li); - litest_touch_move_to(dev, 1, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 1, 50, 50, 70, 70, 10); libinput_dispatch(li); litest_assert_touch_motion_frame(li); litest_axis_set_value(axes, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER); - litest_touch_move_to_extended(dev, 0, 50, 40, 70, 70, axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 40, 70, 70, axes, 10); litest_assert_empty_queue(li); - litest_touch_move_to(dev, 1, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 1, 70, 70, 50, 40, 10); libinput_dispatch(li); litest_assert_touch_motion_frame(li); @@ -1229,7 +1229,7 @@ START_TEST(touch_palm_detect_tool_palm_on_off_2fg) libinput_dispatch(li); litest_assert_touch_up_frame(li); - litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1250,12 +1250,12 @@ START_TEST(touch_palm_detect_tool_palm_keep_type_2fg) litest_touch_down(dev, 0, 50, 50); litest_touch_down(dev, 1, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); - litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); + litest_touch_move_to_extended(dev, 0, 50, 50, 70, 70, axes, 10); litest_touch_up(dev, 0); litest_drain_events(li); - litest_touch_move_to(dev, 1, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 1, 50, 50, 70, 70, 10); libinput_dispatch(li); litest_assert_touch_motion_frame(li); @@ -1265,7 +1265,7 @@ START_TEST(touch_palm_detect_tool_palm_keep_type_2fg) /* Test the revert to finger case too */ litest_axis_set_value(axes, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER); - litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); diff --git a/test/test-touchpad-buttons.c b/test/test-touchpad-buttons.c index 8e103c30..d2dee56e 100644 --- a/test/test-touchpad-buttons.c +++ b/test/test-touchpad-buttons.c @@ -998,7 +998,7 @@ START_TEST(clickpad_click_n_drag) /* now put a second finger down */ litest_touch_down(dev, 1, 70, 70); - litest_touch_move_to(dev, 1, 70, 70, 80, 50, 5, 0); + litest_touch_move_to(dev, 1, 70, 70, 80, 50, 5); litest_touch_up(dev, 1); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -1036,17 +1036,17 @@ START_TEST(clickpad_finger_pin) /* make sure the movement generates pointer events when not pinned */ litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 52, 52, 10, 1); - litest_touch_move_to(dev, 0, 52, 52, 48, 48, 10, 1); - litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 52, 52, 10); + litest_touch_move_to(dev, 0, 52, 52, 48, 48, 10); + litest_touch_move_to(dev, 0, 48, 48, 50, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_button_click(dev, BTN_LEFT, true); litest_drain_events(li); - litest_touch_move_to(dev, 0, 50, 50, 50 + dist, 50 + dist, 10, 1); - litest_touch_move_to(dev, 0, 50 + dist, 50 + dist, 50, 50, 10, 1); - litest_touch_move_to(dev, 0, 50, 50, 50 - dist, 50 - dist, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 50 + dist, 50 + dist, 10); + litest_touch_move_to(dev, 0, 50 + dist, 50 + dist, 50, 50, 10); + litest_touch_move_to(dev, 0, 50, 50, 50 - dist, 50 - dist, 10); litest_assert_empty_queue(li); @@ -1054,14 +1054,14 @@ START_TEST(clickpad_finger_pin) litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON); /* still pinned after release */ - litest_touch_move_to(dev, 0, 50, 50, 50 + dist, 50 + dist, 10, 1); - litest_touch_move_to(dev, 0, 50 + dist, 50 + dist, 50, 50, 10, 1); - litest_touch_move_to(dev, 0, 50, 50, 50 - dist, 50 - dist, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 50 + dist, 50 + dist, 10); + litest_touch_move_to(dev, 0, 50 + dist, 50 + dist, 50, 50, 10); + litest_touch_move_to(dev, 0, 50, 50, 50 - dist, 50 - dist, 10); litest_assert_empty_queue(li); /* move to unpin */ - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } END_TEST @@ -1266,14 +1266,14 @@ START_TEST(clickpad_softbutton_left_1st_fg_move) litest_assert_empty_queue(li); /* move out of the area, then wait for softbutton timer */ - litest_touch_move_to(dev, 0, 20, 90, 50, 50, 20, 10); + litest_touch_move_to(dev, 0, 20, 90, 50, 50, 20); libinput_dispatch(li); litest_timeout_softbuttons(); libinput_dispatch(li); litest_drain_events(li); /* move down left, expect motion */ - litest_touch_move_to(dev, 0, 50, 50, 20, 90, 20, 10); + litest_touch_move_to(dev, 0, 50, 50, 20, 90, 20); libinput_dispatch(li); event = libinput_get_event(li); @@ -1339,7 +1339,7 @@ START_TEST(clickpad_softbutton_left_2nd_fg_move) litest_assert_empty_queue(li); litest_touch_down(dev, 1, 20, 20); - litest_touch_move_to(dev, 1, 20, 20, 80, 20, 10, 0); + litest_touch_move_to(dev, 1, 20, 20, 80, 20, 10); libinput_dispatch(li); event = libinput_get_event(li); @@ -1370,7 +1370,7 @@ START_TEST(clickpad_softbutton_left_2nd_fg_move) /* second finger down */ litest_touch_down(dev, 1, 20, 20); - litest_touch_move_to(dev, 1, 20, 20, 20, 80, 10, 0); + litest_touch_move_to(dev, 1, 20, 20, 20, 80, 10); libinput_dispatch(li); event = libinput_get_event(li); @@ -1421,7 +1421,7 @@ START_TEST(clickpad_softbutton_left_to_right) */ litest_touch_down(dev, 0, 30, 90); - litest_touch_move_to(dev, 0, 30, 90, 90, 90, 10, 10); + litest_touch_move_to(dev, 0, 30, 90, 90, 90, 10); litest_drain_events(li); litest_event(dev, EV_KEY, BTN_LEFT, 1); @@ -1457,7 +1457,7 @@ START_TEST(clickpad_softbutton_right_to_left) */ litest_touch_down(dev, 0, 80, 90); - litest_touch_move_to(dev, 0, 80, 90, 30, 90, 10, 10); + litest_touch_move_to(dev, 0, 80, 90, 30, 90, 10); litest_drain_events(li); litest_event(dev, EV_KEY, BTN_LEFT, 1); @@ -1489,10 +1489,10 @@ START_TEST(clickpad_softbutton_hover_into_buttons) litest_hover_start(dev, 0, 50, 50); libinput_dispatch(li); - litest_hover_move_to(dev, 0, 50, 50, 90, 90, 10, 0); + litest_hover_move_to(dev, 0, 50, 50, 90, 90, 10); libinput_dispatch(li); - litest_touch_move_to(dev, 0, 90, 90, 91, 91, 1, 0); + litest_touch_move_to(dev, 0, 90, 90, 91, 91, 1); litest_button_click(dev, BTN_LEFT, true); libinput_dispatch(li); @@ -1614,7 +1614,7 @@ START_TEST(clickpad_topsoftbuttons_move_out_leftclick_before_timeout) libinput_dispatch(li); litest_assert_empty_queue(li); - litest_touch_move_to(dev, 0, 80, 5, 80, 90, 20, 0); + litest_touch_move_to(dev, 0, 80, 5, 80, 90, 20); libinput_dispatch(li); litest_event(dev, EV_KEY, BTN_LEFT, 1); @@ -1648,7 +1648,7 @@ START_TEST(clickpad_topsoftbuttons_move_out_leftclick) libinput_dispatch(li); litest_assert_empty_queue(li); - litest_touch_move_to(dev, 0, 80, 5, 80, 90, 20, 0); + litest_touch_move_to(dev, 0, 80, 5, 80, 90, 20); libinput_dispatch(li); litest_timeout_softbuttons(); libinput_dispatch(li); diff --git a/test/test-touchpad-tap.c b/test/test-touchpad-tap.c index e7cee553..c62d2158 100644 --- a/test/test-touchpad-tap.c +++ b/test/test-touchpad-tap.c @@ -190,7 +190,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_move) libinput_dispatch(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10); libinput_dispatch(li); for (ntaps = 0; ntaps < range; ntaps++) { @@ -291,7 +291,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_2fg) libinput_event_destroy(event); ck_assert_int_gt(curtime, oldtime); - litest_touch_move_to(dev, 1, 70, 50, 90, 50, 10, 4); + litest_touch_move_to(dev, 1, 70, 50, 90, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -474,7 +474,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_timeout) libinput_event_destroy(event); ck_assert_int_gt(curtime, oldtime); - litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -546,7 +546,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap) libinput_event_destroy(event); ck_assert_int_gt(curtime, oldtime); - litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -620,7 +620,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap_click) libinput_event_destroy(event); ck_assert_int_gt(curtime, oldtime); - litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -662,7 +662,7 @@ START_TEST(touchpad_1fg_tap_n_drag) litest_touch_down(dev, 0, 50, 50); litest_touch_up(dev, 0); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20, 2); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20); libinput_dispatch(li); @@ -704,7 +704,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock) litest_touch_down(dev, 0, 50, 50); litest_touch_up(dev, 0); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20, 2); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -718,7 +718,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock) /* lift finger, set down again, should continue dragging */ litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20, 2); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -745,7 +745,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock_tap) litest_touch_down(dev, 0, 50, 50); litest_touch_up(dev, 0); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20, 2); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -759,7 +759,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock_tap) /* lift finger, set down again, should continue dragging */ litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20, 2); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -787,7 +787,7 @@ START_TEST(touchpad_1fg_tap_n_drag_draglock_tap_click) litest_touch_down(dev, 0, 50, 50); litest_touch_up(dev, 0); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20, 2); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 20); libinput_dispatch(li); litest_assert_button_event(li, BTN_LEFT, @@ -864,7 +864,7 @@ START_TEST(touchpad_2fg_tap_n_drag) litest_touch_up(dev, 0); litest_touch_down(dev, 0, 30, 70); litest_touch_down(dev, 1, 80, 70); - litest_touch_move_to(dev, 0, 30, 70, 30, 30, 10, 10); + litest_touch_move_to(dev, 0, 30, 70, 30, 30, 10); libinput_dispatch(li); litest_assert_button_event(li, BTN_LEFT, @@ -899,7 +899,7 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg_btntool) litest_touch_up(dev, 0); litest_touch_down(dev, 0, 30, 70); litest_touch_down(dev, 1, 80, 90); - litest_touch_move_to(dev, 0, 30, 70, 30, 30, 5, 40); + litest_touch_move_to(dev, 0, 30, 70, 30, 30, 5); libinput_dispatch(li); litest_assert_button_event(li, BTN_LEFT, @@ -944,7 +944,7 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg) litest_touch_up(dev, 0); litest_touch_down(dev, 0, 30, 70); litest_touch_down(dev, 1, 80, 90); - litest_touch_move_to(dev, 0, 30, 70, 30, 30, 10, 10); + litest_touch_move_to(dev, 0, 30, 70, 30, 30, 10); libinput_dispatch(li); litest_assert_button_event(li, BTN_LEFT, @@ -1322,7 +1322,7 @@ START_TEST(touchpad_no_2fg_tap_after_move) -> no event */ litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10); litest_drain_events(dev->libinput); litest_touch_down(dev, 1, 70, 50); @@ -1375,7 +1375,7 @@ START_TEST(touchpad_no_first_fg_tap_after_move) litest_touch_down(dev, 0, 50, 50); litest_touch_down(dev, 1, 70, 50); libinput_dispatch(dev->libinput); - litest_touch_move_to(dev, 1, 70, 50, 90, 90, 10, 0); + litest_touch_move_to(dev, 1, 70, 50, 90, 90, 10); libinput_dispatch(dev->libinput); litest_touch_up(dev, 0); litest_touch_up(dev, 1); @@ -1438,7 +1438,7 @@ START_TEST(touchpad_1fg_tap_n_drag_click) litest_touch_down(dev, 0, 50, 50); litest_touch_up(dev, 0); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 50, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 80, 50, 10); litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_PRESSED); @@ -1646,8 +1646,8 @@ START_TEST(touchpad_3fg_tap_pressure_btntool) litest_touch_down(dev, 1, 70, 50); libinput_dispatch(li); - litest_touch_move_to(dev, 0, 50, 50, 50, 70, 10, 0); - litest_touch_move_to(dev, 1, 70, 50, 50, 70, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 50, 70, 10); + litest_touch_move_to(dev, 1, 70, 50, 50, 70, 10); litest_drain_events(li); /* drop below the pressure threshold in the same frame as starting a @@ -1710,8 +1710,8 @@ START_TEST(touchpad_3fg_tap_hover_btntool) litest_touch_down(dev, 1, 70, 50); libinput_dispatch(li); - litest_touch_move_to(dev, 0, 50, 50, 50, 70, 10, 0); - litest_touch_move_to(dev, 1, 70, 50, 50, 70, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 50, 70, 10); + litest_touch_move_to(dev, 1, 70, 50, 50, 70, 10); litest_drain_events(li); /* drop below the pressure threshold in the same frame as starting a @@ -1866,7 +1866,7 @@ START_TEST(touchpad_3fg_tap_btntool_pointerjump) litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0); litest_event(dev, EV_SYN, SYN_REPORT, 0); /* Pointer jump should be ignored */ - litest_touch_move_to(dev, 0, 50, 50, 20, 20, 0, 0); + litest_touch_move_to(dev, 0, 50, 50, 20, 20, 0); libinput_dispatch(li); litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 0); litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1); @@ -2447,7 +2447,7 @@ START_TEST(touchpad_drag_disabled) litest_touch_up(dev, 0); libinput_dispatch(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 90, 90, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -2525,7 +2525,7 @@ START_TEST(touchpad_drag_disabled_multitap_no_drag) libinput_dispatch(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 4); + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10); libinput_dispatch(li); for (ntaps = 0; ntaps <= range; ntaps++) { @@ -2662,7 +2662,7 @@ START_TEST(touchpad_tap_palm_on_touch) /* Finger down is palm after touch begin */ litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -2692,7 +2692,7 @@ START_TEST(touchpad_tap_palm_on_touch_hold_timeout) libinput_dispatch(li); litest_timeout_tap(); libinput_dispatch(li); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -2719,10 +2719,10 @@ START_TEST(touchpad_tap_palm_on_touch_hold_move) /* Finger down is palm after tap move threshold */ litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 60, 60, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 60, 60, 10); litest_drain_events(li); - litest_touch_move_to_extended(dev, 0, 60, 60, 60, 60, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 60, 60, 60, 60, axes, 1); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -2757,7 +2757,7 @@ START_TEST(touchpad_tap_palm_on_tapped) LIBINPUT_BUTTON_STATE_PRESSED); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -2798,7 +2798,7 @@ START_TEST(touchpad_tap_palm_on_tapped_palm_down) LIBINPUT_BUTTON_STATE_PRESSED); litest_touch_down_extended(dev, 0, 50, 50, axes); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -2839,7 +2839,7 @@ START_TEST(touchpad_tap_palm_on_tapped_2fg) LIBINPUT_BUTTON_STATE_PRESSED); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); libinput_dispatch(li); @@ -2895,7 +2895,7 @@ START_TEST(touchpad_tap_palm_on_drag) litest_timeout_tap(); libinput_dispatch(li); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); libinput_dispatch(li); litest_assert_button_event(li, @@ -2939,10 +2939,10 @@ START_TEST(touchpad_tap_palm_on_drag_2fg) litest_touch_down(dev, other, 60, 50); libinput_dispatch(li); - litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1); libinput_dispatch(li); - litest_touch_move_to(dev, other, 60, 50, 65, 50, 10, 1); + litest_touch_move_to(dev, other, 60, 50, 65, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_touch_up(dev, other); @@ -2978,7 +2978,7 @@ START_TEST(touchpad_tap_palm_on_touch_2) litest_touch_down(dev, 0, 50, 50); litest_touch_down(dev, 1, 60, 60); litest_drain_events(li); - litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, this); litest_touch_up(dev, other); @@ -3019,7 +3019,7 @@ START_TEST(touchpad_tap_palm_on_touch_2_retouch) litest_touch_down(dev, this, 50, 50); litest_touch_down(dev, other, 60, 60); litest_drain_events(li); - litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, this); libinput_dispatch(li); @@ -3066,7 +3066,7 @@ START_TEST(touchpad_tap_palm_on_touch_3) litest_touch_down(dev, (this + 1) % 3, 60, 50); litest_touch_down(dev, (this + 2) % 3, 70, 50); litest_drain_events(li); - litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, this); libinput_dispatch(li); @@ -3115,7 +3115,7 @@ START_TEST(touchpad_tap_palm_on_touch_3_retouch) litest_timeout_tap(); libinput_dispatch(li); - litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, this); libinput_dispatch(li); @@ -3164,7 +3164,7 @@ START_TEST(touchpad_tap_palm_on_touch_4) litest_touch_down(dev, (this + 2) % 4, 70, 50); litest_touch_down(dev, (this + 3) % 4, 80, 50); litest_drain_events(li); - litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, this, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, this); libinput_dispatch(li); @@ -3201,7 +3201,7 @@ START_TEST(touchpad_tap_palm_after_tap) LIBINPUT_BUTTON_STATE_PRESSED); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -3239,7 +3239,7 @@ START_TEST(touchpad_tap_palm_multitap) } litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); litest_touch_up(dev, 0); libinput_dispatch(li); litest_timeout_tap(); @@ -3283,7 +3283,7 @@ START_TEST(touchpad_tap_palm_multitap_timeout) } litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); libinput_dispatch(li); litest_timeout_tap(); libinput_dispatch(li); @@ -3326,7 +3326,7 @@ START_TEST(touchpad_tap_palm_multitap_down_again) } litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); libinput_dispatch(li); /* keep palm finger down */ @@ -3376,7 +3376,7 @@ START_TEST(touchpad_tap_palm_multitap_click) } litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); libinput_dispatch(li); /* keep palm finger down */ @@ -3486,7 +3486,7 @@ START_TEST(touchpad_tap_palm_dwt_tap) libinput_dispatch(li); /* Changes to palm after dwt timeout */ - litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 50, 50, axes, 1); libinput_dispatch(li); litest_touch_up(dev, 0); diff --git a/test/test-touchpad.c b/test/test-touchpad.c index a29e8ff7..4816036f 100644 --- a/test/test-touchpad.c +++ b/test/test-touchpad.c @@ -65,7 +65,7 @@ START_TEST(touchpad_1fg_motion) litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 50, 20, 0); + litest_touch_move_to(dev, 0, 50, 50, 80, 50, 20); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -99,8 +99,8 @@ START_TEST(touchpad_2fg_no_motion) litest_touch_down(dev, 0, 20, 20); litest_touch_down(dev, 1, 70, 20); - litest_touch_move_to(dev, 0, 20, 20, 80, 80, 20, 0); - litest_touch_move_to(dev, 1, 70, 20, 80, 50, 20, 0); + litest_touch_move_to(dev, 0, 20, 20, 80, 80, 20); + litest_touch_move_to(dev, 1, 70, 20, 80, 50, 20); litest_touch_up(dev, 1); litest_touch_up(dev, 0); @@ -124,7 +124,7 @@ test_2fg_scroll(struct litest_device *dev, double dx, double dy, bool want_sleep litest_touch_down(dev, 0, 49, 50); litest_touch_down(dev, 1, 51, 50); - litest_touch_move_two_touches(dev, 49, 50, 51, 50, dx, dy, 10, 10); + litest_touch_move_two_touches(dev, 49, 50, 51, 50, dx, dy, 10); /* Avoid a small scroll being seen as a tap */ if (want_sleep) { @@ -183,7 +183,7 @@ START_TEST(touchpad_2fg_scroll_initially_diagonal) litest_touch_down(dev, 1, 55, 30); /* start diagonally */ - litest_touch_move_two_touches(dev, 45, 30, 55, 30, 10, 10, 10, 0); + litest_touch_move_two_touches(dev, 45, 30, 55, 30, 10, 10, 10); libinput_dispatch(li); litest_wait_for_event_of_type(li, LIBINPUT_EVENT_POINTER_AXIS, @@ -306,7 +306,7 @@ START_TEST(touchpad_2fg_scroll_axis_lock_switch) litest_touch_down(dev, 1, 25, 20); /* Move roughly straight horizontally for >100ms to set axis lock */ - litest_touch_move_two_touches(dev, 20, 20, 25, 20, 55, 10, 15, 10); + litest_touch_move_two_touches(dev, 20, 20, 25, 20, 55, 10, 15); libinput_dispatch(li); litest_wait_for_event_of_type(li, LIBINPUT_EVENT_POINTER_AXIS, @@ -323,7 +323,7 @@ START_TEST(touchpad_2fg_scroll_axis_lock_switch) * contain some horizontal movement while the lock changes; don't * check for single-axis yet */ - litest_touch_move_two_touches(dev, 75, 30, 80, 30, 2, 20, 15, 10); + litest_touch_move_two_touches(dev, 75, 30, 80, 30, 2, 20, 15); libinput_dispatch(li); litest_wait_for_event_of_type(li, LIBINPUT_EVENT_POINTER_AXIS, @@ -331,7 +331,7 @@ START_TEST(touchpad_2fg_scroll_axis_lock_switch) litest_drain_events(li); /* Move some more, roughly vertically, and check new axis lock */ - litest_touch_move_two_touches(dev, 77, 50, 82, 50, 1, 40, 15, 10); + litest_touch_move_two_touches(dev, 77, 50, 82, 50, 1, 40, 15); libinput_dispatch(li); litest_wait_for_event_of_type(li, LIBINPUT_EVENT_POINTER_AXIS, @@ -342,7 +342,7 @@ START_TEST(touchpad_2fg_scroll_axis_lock_switch) litest_drain_events(li); /* Move in a clear diagonal direction to ensure the lock releases */ - litest_touch_move_two_touches(dev, 78, 90, 83, 90, -60, -60, 20, 10); + litest_touch_move_two_touches(dev, 78, 90, 83, 90, -60, -60, 20); libinput_dispatch(li); litest_wait_for_event_of_type(li, LIBINPUT_EVENT_POINTER_AXIS, @@ -381,7 +381,7 @@ START_TEST(touchpad_2fg_scroll_slow_distance) litest_touch_down(dev, 0, 49, 50); litest_touch_down(dev, 1, 51, 50); - litest_touch_move_two_touches(dev, 49, 50, 51, 50, 0, y_move, 100, 10); + litest_touch_move_two_touches(dev, 49, 50, 51, 50, 0, y_move, 100); litest_touch_up(dev, 1); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -459,7 +459,7 @@ START_TEST(touchpad_2fg_scroll_semi_mt) 20, 20, 30, 20, 30, 40, - 10, 1); + 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); } @@ -478,24 +478,24 @@ START_TEST(touchpad_2fg_scroll_return_to_motion) /* start with motion */ litest_touch_down(dev, 0, 70, 70); - litest_touch_move_to(dev, 0, 70, 70, 49, 50, 10, 0); + litest_touch_move_to(dev, 0, 70, 70, 49, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); /* 2fg scroll */ litest_touch_down(dev, 1, 51, 50); - litest_touch_move_two_touches(dev, 49, 50, 51, 50, 0, 20, 5, 0); + litest_touch_move_two_touches(dev, 49, 50, 51, 50, 0, 20, 5); litest_touch_up(dev, 1); libinput_dispatch(li); litest_timeout_finger_switch(); libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); - litest_touch_move_to(dev, 0, 49, 70, 49, 50, 10, 0); + litest_touch_move_to(dev, 0, 49, 70, 49, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); /* back to 2fg scroll, lifting the other finger */ litest_touch_down(dev, 1, 51, 50); - litest_touch_move_two_touches(dev, 49, 50, 51, 50, 0, 20, 5, 0); + litest_touch_move_two_touches(dev, 49, 50, 51, 50, 0, 20, 5); litest_touch_up(dev, 0); libinput_dispatch(li); litest_timeout_finger_switch(); @@ -503,7 +503,7 @@ START_TEST(touchpad_2fg_scroll_return_to_motion) litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); /* move with second finger */ - litest_touch_move_to(dev, 1, 51, 70, 51, 50, 10, 0); + litest_touch_move_to(dev, 1, 51, 70, 51, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_touch_up(dev, 1); @@ -572,7 +572,7 @@ START_TEST(touchpad_scroll_natural_edge) libinput_device_config_scroll_set_natural_scroll_enabled(dev->libinput_device, 1); litest_touch_down(dev, 0, 99, 20); - litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10, 0); + litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -580,7 +580,7 @@ START_TEST(touchpad_scroll_natural_edge) litest_assert_empty_queue(li); litest_touch_down(dev, 0, 99, 80); - litest_touch_move_to(dev, 0, 99, 80, 99, 20, 10, 0); + litest_touch_move_to(dev, 0, 99, 80, 99, 20, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -596,14 +596,14 @@ START_TEST(touchpad_edge_scroll_vert) struct libinput *li = dev->libinput; litest_touch_down(dev, 0, 99, 20); - litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10, 0); + litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10); litest_touch_up(dev, 0); litest_drain_events(li); litest_enable_edge_scroll(dev); litest_touch_down(dev, 0, 99, 20); - litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10, 0); + litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -611,7 +611,7 @@ START_TEST(touchpad_edge_scroll_vert) litest_assert_empty_queue(li); litest_touch_down(dev, 0, 99, 80); - litest_touch_move_to(dev, 0, 99, 80, 99, 20, 10, 0); + litest_touch_move_to(dev, 0, 99, 80, 99, 20, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -637,7 +637,7 @@ START_TEST(touchpad_edge_scroll_horiz) struct libinput *li = dev->libinput; litest_touch_down(dev, 0, 99, 20); - litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10, 0); + litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10); litest_touch_up(dev, 0); if (!touchpad_has_horiz_edge_scroll_size(dev)) @@ -647,7 +647,7 @@ START_TEST(touchpad_edge_scroll_horiz) litest_enable_edge_scroll(dev); litest_touch_down(dev, 0, 20, 99); - litest_touch_move_to(dev, 0, 20, 99, 70, 99, 10, 0); + litest_touch_move_to(dev, 0, 20, 99, 70, 99, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -655,7 +655,7 @@ START_TEST(touchpad_edge_scroll_horiz) litest_assert_empty_queue(li); litest_touch_down(dev, 0, 70, 99); - litest_touch_move_to(dev, 0, 70, 99, 20, 99, 10, 0); + litest_touch_move_to(dev, 0, 70, 99, 20, 99, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -673,7 +673,7 @@ START_TEST(touchpad_edge_scroll_horiz_clickpad) litest_enable_edge_scroll(dev); litest_touch_down(dev, 0, 20, 99); - litest_touch_move_to(dev, 0, 20, 99, 70, 99, 10, 0); + litest_touch_move_to(dev, 0, 20, 99, 70, 99, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -681,7 +681,7 @@ START_TEST(touchpad_edge_scroll_horiz_clickpad) litest_assert_empty_queue(li); litest_touch_down(dev, 0, 70, 99); - litest_touch_move_to(dev, 0, 70, 99, 20, 99, 10, 0); + litest_touch_move_to(dev, 0, 70, 99, 20, 99, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -702,13 +702,13 @@ START_TEST(touchpad_edge_scroll_no_horiz) litest_enable_edge_scroll(dev); litest_touch_down(dev, 0, 20, 99); - litest_touch_move_to(dev, 0, 20, 99, 70, 99, 10, 0); + litest_touch_move_to(dev, 0, 20, 99, 70, 99, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_touch_down(dev, 0, 70, 99); - litest_touch_move_to(dev, 0, 70, 99, 20, 99, 10, 0); + litest_touch_move_to(dev, 0, 70, 99, 20, 99, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -791,7 +791,7 @@ START_TEST(touchpad_edge_scroll_timeout) litest_timeout_hysteresis(); libinput_dispatch(li); - litest_touch_move_to(dev, 0, 99, 20, 99, 20 + mm/2, 8, 0); + litest_touch_move_to(dev, 0, 99, 20, 99, 20 + mm/2, 8); libinput_dispatch(li); litest_assert_empty_queue(li); @@ -801,7 +801,7 @@ START_TEST(touchpad_edge_scroll_timeout) litest_assert_empty_queue(li); /* now move slowly up to the 2mm scroll threshold. we expect events */ - litest_touch_move_to(dev, 0, 99, 20 + mm/2, 99, 20 + mm * 2, 20, 0); + litest_touch_move_to(dev, 0, 99, 20 + mm/2, 99, 20 + mm * 2, 20); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -838,11 +838,11 @@ START_TEST(touchpad_edge_scroll_no_motion) litest_enable_edge_scroll(dev); litest_touch_down(dev, 0, 99, 10); - litest_touch_move_to(dev, 0, 99, 10, 99, 70, 12, 0); + litest_touch_move_to(dev, 0, 99, 10, 99, 70, 12); /* moving outside -> no motion event */ - litest_touch_move_to(dev, 0, 99, 70, 20, 70, 12, 0); + litest_touch_move_to(dev, 0, 99, 70, 20, 70, 12); /* moving down outside edge once scrolling had started -> scroll */ - litest_touch_move_to(dev, 0, 20, 70, 40, 99, 12, 0); + litest_touch_move_to(dev, 0, 20, 70, 40, 99, 12); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -861,8 +861,8 @@ START_TEST(touchpad_edge_scroll_no_edge_after_motion) /* moving into the edge zone must not trigger scroll events */ litest_touch_down(dev, 0, 20, 20); - litest_touch_move_to(dev, 0, 20, 20, 99, 20, 22, 10); - litest_touch_move_to(dev, 0, 99, 20, 99, 80, 22, 10); + litest_touch_move_to(dev, 0, 20, 20, 99, 20, 22); + litest_touch_move_to(dev, 0, 99, 20, 99, 80, 22); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -882,7 +882,7 @@ START_TEST(touchpad_edge_scroll_source) litest_enable_edge_scroll(dev); litest_touch_down(dev, 0, 99, 20); - litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10, 0); + litest_touch_move_to(dev, 0, 99, 20, 99, 80, 10); litest_touch_up(dev, 0); litest_wait_for_event_of_type(li, LIBINPUT_EVENT_POINTER_AXIS, -1); @@ -908,7 +908,7 @@ START_TEST(touchpad_edge_scroll_no_2fg) litest_touch_down(dev, 0, 49, 50); litest_touch_down(dev, 1, 51, 50); - litest_touch_move_two_touches(dev, 49, 50, 51, 50, 20, 30, 10, 10); + litest_touch_move_two_touches(dev, 49, 50, 51, 50, 20, 30, 10); libinput_dispatch(li); litest_touch_up(dev, 0); litest_touch_up(dev, 1); @@ -928,18 +928,18 @@ START_TEST(touchpad_edge_scroll_into_buttonareas) litest_drain_events(li); litest_touch_down(dev, 0, 99, 40); - litest_touch_move_to(dev, 0, 99, 40, 99, 95, 10, 0); + litest_touch_move_to(dev, 0, 99, 40, 99, 95, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); /* in the button zone now, make sure we still get events */ - litest_touch_move_to(dev, 0, 99, 95, 99, 100, 10, 0); + litest_touch_move_to(dev, 0, 99, 95, 99, 100, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); /* and out of the zone again */ - litest_touch_move_to(dev, 0, 99, 100, 99, 70, 10, 0); + litest_touch_move_to(dev, 0, 99, 100, 99, 70, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); /* still out of the zone */ - litest_touch_move_to(dev, 0, 99, 70, 99, 50, 10, 0); + litest_touch_move_to(dev, 0, 99, 70, 99, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); } END_TEST @@ -959,15 +959,15 @@ START_TEST(touchpad_edge_scroll_within_buttonareas) litest_touch_down(dev, 0, 20, 99); /* within left button */ - litest_touch_move_to(dev, 0, 20, 99, 40, 99, 10, 0); + litest_touch_move_to(dev, 0, 20, 99, 40, 99, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); /* over to right button */ - litest_touch_move_to(dev, 0, 40, 99, 60, 99, 10, 0); + litest_touch_move_to(dev, 0, 40, 99, 60, 99, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); /* within right button */ - litest_touch_move_to(dev, 0, 60, 99, 80, 99, 10, 0); + litest_touch_move_to(dev, 0, 60, 99, 80, 99, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); } END_TEST @@ -988,7 +988,7 @@ START_TEST(touchpad_edge_scroll_buttonareas_click_stops_scroll) litest_drain_events(li); litest_touch_down(dev, 0, 20, 95); - litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10, 5); + litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); litest_button_click(dev, BTN_LEFT, true); @@ -1017,7 +1017,7 @@ START_TEST(touchpad_edge_scroll_buttonareas_click_stops_scroll) * edge scrolling, click, then scrolling without lifting the finger * is so small we'll let it pass. */ - litest_touch_move_to(dev, 0, 70, 95, 90, 95, 10, 0); + litest_touch_move_to(dev, 0, 70, 95, 90, 95, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_button_click(dev, BTN_LEFT, false); @@ -1044,7 +1044,7 @@ START_TEST(touchpad_edge_scroll_clickfinger_click_stops_scroll) litest_drain_events(li); litest_touch_down(dev, 0, 20, 95); - litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10, 5); + litest_touch_move_to(dev, 0, 20, 95, 70, 95, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); litest_button_click(dev, BTN_LEFT, true); @@ -1067,7 +1067,7 @@ START_TEST(touchpad_edge_scroll_clickfinger_click_stops_scroll) libinput_event_destroy(event); /* clickfinger releases pointer -> expect movement */ - litest_touch_move_to(dev, 0, 70, 95, 90, 95, 10, 0); + litest_touch_move_to(dev, 0, 70, 95, 90, 95, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_assert_empty_queue(li); @@ -1090,15 +1090,15 @@ START_TEST(touchpad_edge_scroll_into_area) /* move into area, move vertically, move back to edge */ litest_touch_down(dev, 0, 99, 20); - litest_touch_move_to(dev, 0, 99, 20, 99, 50, 15, 2); - litest_touch_move_to(dev, 0, 99, 50, 20, 50, 15, 2); + litest_touch_move_to(dev, 0, 99, 20, 99, 50, 15); + litest_touch_move_to(dev, 0, 99, 50, 20, 50, 15); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); - litest_touch_move_to(dev, 0, 20, 50, 20, 20, 15, 2); - litest_touch_move_to(dev, 0, 20, 20, 99, 20, 15, 2); + litest_touch_move_to(dev, 0, 20, 50, 20, 20, 15); + litest_touch_move_to(dev, 0, 20, 20, 99, 20, 15); litest_assert_empty_queue(li); - litest_touch_move_to(dev, 0, 99, 20, 99, 50, 15, 2); + litest_touch_move_to(dev, 0, 99, 20, 99, 50, 15); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); } @@ -1156,13 +1156,13 @@ START_TEST(touchpad_palm_detect_at_edge) litest_drain_events(li); litest_touch_down(dev, 0, 99, 50); - litest_touch_move_to(dev, 0, 99, 50, 99, 70, 5, 0); + litest_touch_move_to(dev, 0, 99, 50, 99, 70, 5); litest_touch_up(dev, 0); litest_assert_empty_queue(li); litest_touch_down(dev, 0, 5, 50); - litest_touch_move_to(dev, 0, 5, 50, 5, 70, 5, 0); + litest_touch_move_to(dev, 0, 5, 50, 5, 70, 5); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1182,7 +1182,7 @@ START_TEST(touchpad_palm_detect_at_top) litest_drain_events(li); litest_touch_down(dev, 0, 20, 1); - litest_touch_move_to(dev, 0, 20, 1, 70, 1, 10, 0); + litest_touch_move_to(dev, 0, 20, 1, 70, 1, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1202,7 +1202,7 @@ START_TEST(touchpad_no_palm_detect_at_edge_for_edge_scrolling) litest_drain_events(li); litest_touch_down(dev, 0, 99, 50); - litest_touch_move_to(dev, 0, 99, 50, 99, 70, 5, 0); + litest_touch_move_to(dev, 0, 99, 50, 99, 70, 5); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); @@ -1227,13 +1227,13 @@ START_TEST(touchpad_palm_detect_at_bottom_corners) litest_drain_events(li); litest_touch_down(dev, 0, 99, 95); - litest_touch_move_to(dev, 0, 99, 95, 99, 99, 10, 0); + litest_touch_move_to(dev, 0, 99, 95, 99, 99, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); litest_touch_down(dev, 0, 5, 95); - litest_touch_move_to(dev, 0, 5, 95, 5, 99, 5, 0); + litest_touch_move_to(dev, 0, 5, 95, 5, 99, 5); litest_touch_up(dev, 0); } END_TEST @@ -1256,13 +1256,13 @@ START_TEST(touchpad_palm_detect_at_top_corners) litest_drain_events(li); litest_touch_down(dev, 0, 99, 5); - litest_touch_move_to(dev, 0, 99, 5, 99, 9, 10, 0); + litest_touch_move_to(dev, 0, 99, 5, 99, 9, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); litest_touch_down(dev, 0, 5, 5); - litest_touch_move_to(dev, 0, 5, 5, 5, 9, 5, 0); + litest_touch_move_to(dev, 0, 5, 5, 5, 9, 5); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1285,7 +1285,7 @@ START_TEST(touchpad_palm_detect_palm_stays_palm) litest_drain_events(li); litest_touch_down(dev, 0, 99, 20); - litest_touch_move_to(dev, 0, 99, 20, 75, 99, 20, 10); + litest_touch_move_to(dev, 0, 99, 20, 75, 99, 20); litest_touch_up(dev, 0); litest_assert_empty_queue(li); } @@ -1304,7 +1304,7 @@ START_TEST(touchpad_palm_detect_top_palm_stays_palm) litest_drain_events(li); litest_touch_down(dev, 0, 20, 1); - litest_touch_move_to(dev, 0, 20, 1, 50, 30, 20, 10); + litest_touch_move_to(dev, 0, 20, 1, 50, 30, 20); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1327,7 +1327,7 @@ START_TEST(touchpad_palm_detect_palm_becomes_pointer) litest_drain_events(li); litest_touch_down(dev, 0, 99, 50); - litest_touch_move_to(dev, 0, 99, 50, 0, 70, 20, 0); + litest_touch_move_to(dev, 0, 99, 50, 0, 70, 20); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -1351,7 +1351,7 @@ START_TEST(touchpad_palm_detect_top_palm_becomes_pointer) litest_drain_events(li); litest_touch_down(dev, 0, 50, 1); - litest_touch_move_to(dev, 0, 50, 1, 50, 60, 20, 0); + litest_touch_move_to(dev, 0, 50, 1, 50, 60, 20); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -1376,11 +1376,11 @@ START_TEST(touchpad_palm_detect_no_palm_moving_into_edges) litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 99, 50, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 99, 50, 10); litest_drain_events(li); - litest_touch_move_to(dev, 0, 99, 50, 99, 90, 10, 0); + litest_touch_move_to(dev, 0, 99, 50, 99, 90, 10); libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -1405,11 +1405,11 @@ START_TEST(touchpad_palm_detect_no_palm_moving_into_top) litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 0, 2, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 0, 2, 10); litest_drain_events(li); - litest_touch_move_to(dev, 0, 0, 2, 50, 50, 10, 0); + litest_touch_move_to(dev, 0, 0, 2, 50, 50, 10); libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -1597,13 +1597,13 @@ START_TEST(touchpad_no_palm_detect_2fg_scroll) /* first finger is palm, second finger isn't so we trigger 2fg * scrolling */ litest_touch_down(dev, 0, 99, 50); - litest_touch_move_to(dev, 0, 99, 50, 99, 40, 35, 12); - litest_touch_move_to(dev, 0, 99, 40, 99, 50, 35, 12); + litest_touch_move_to(dev, 0, 99, 50, 99, 40, 45); + litest_touch_move_to(dev, 0, 99, 40, 99, 50, 45); litest_assert_empty_queue(li); litest_touch_down(dev, 1, 50, 50); litest_assert_empty_queue(li); - litest_touch_move_two_touches(dev, 99, 50, 50, 50, 0, -20, 10, 0); + litest_touch_move_two_touches(dev, 99, 50, 50, 50, 0, -20, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); } END_TEST @@ -1624,16 +1624,16 @@ START_TEST(touchpad_palm_detect_both_edges) /* two fingers moving up/down in the left/right palm zone must not * generate events */ litest_touch_down(dev, 0, 99, 50); - litest_touch_move_to(dev, 0, 99, 50, 99, 40, 10, 0); - litest_touch_move_to(dev, 0, 99, 40, 99, 50, 10, 0); + litest_touch_move_to(dev, 0, 99, 50, 99, 40, 10); + litest_touch_move_to(dev, 0, 99, 40, 99, 50, 10); litest_assert_empty_queue(li); /* This set generates events */ litest_touch_down(dev, 1, 1, 50); - litest_touch_move_to(dev, 1, 1, 50, 1, 40, 10, 0); - litest_touch_move_to(dev, 1, 1, 40, 1, 50, 10, 0); + litest_touch_move_to(dev, 1, 1, 50, 1, 40, 10); + litest_touch_move_to(dev, 1, 1, 40, 1, 50, 10); litest_assert_empty_queue(li); - litest_touch_move_two_touches(dev, 99, 50, 1, 50, 0, -20, 10, 0); + litest_touch_move_two_touches(dev, 99, 50, 1, 50, 0, -20, 10); litest_assert_empty_queue(li); } END_TEST @@ -1653,12 +1653,12 @@ START_TEST(touchpad_palm_detect_tool_palm) return; litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_drain_events(li); litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_PALM); litest_event(dev, EV_SYN, SYN_REPORT, 0); - litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1674,18 +1674,18 @@ START_TEST(touchpad_palm_detect_tool_palm_on_off) return; litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_drain_events(li); litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_PALM); litest_event(dev, EV_SYN, SYN_REPORT, 0); - litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10, 1); + litest_touch_move_to(dev, 0, 70, 70, 50, 40, 10); litest_assert_empty_queue(li); litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER); litest_event(dev, EV_SYN, SYN_REPORT, 0); - litest_touch_move_to(dev, 0, 50, 40, 70, 70, 10, 1); + litest_touch_move_to(dev, 0, 50, 40, 70, 70, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -1709,7 +1709,7 @@ START_TEST(touchpad_palm_detect_tool_palm_tap_after) litest_pop_event_frame(dev); libinput_dispatch(li); - litest_touch_move_to(dev, 0, 50, 50, 50, 80, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 50, 80, 10); libinput_dispatch(li); litest_assert_empty_queue(li); @@ -1787,7 +1787,7 @@ START_TEST(touchpad_palm_detect_pressure) litest_drain_events(li); litest_touch_down_extended(dev, 0, 50, 99, axes); - litest_touch_move_to(dev, 0, 50, 50, 80, 99, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 80, 99, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1810,11 +1810,10 @@ START_TEST(touchpad_palm_detect_pressure_late) litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 70, 80, 90, 10, 0); + litest_touch_move_to(dev, 0, 50, 70, 80, 90, 10); litest_drain_events(li); libinput_dispatch(li); - litest_touch_move_to_extended(dev, 0, 80, 90, 50, 20, - axes, 10, 0); + litest_touch_move_to_extended(dev, 0, 80, 90, 50, 20, axes, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1837,9 +1836,8 @@ START_TEST(touchpad_palm_detect_pressure_keep_palm) litest_drain_events(li); litest_touch_down(dev, 0, 80, 90); - litest_touch_move_to_extended(dev, 0, 80, 90, 50, 20, - axes, 10, 0); - litest_touch_move_to(dev, 0, 50, 20, 80, 90, 10, 0); + litest_touch_move_to_extended(dev, 0, 80, 90, 50, 20, axes, 10); + litest_touch_move_to(dev, 0, 50, 20, 80, 90, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -1865,7 +1863,7 @@ START_TEST(touchpad_palm_detect_pressure_after_edge) litest_drain_events(li); litest_touch_down(dev, 0, 99, 50); - litest_touch_move_to_extended(dev, 0, 99, 50, 20, 50, axes, 20, 0); + litest_touch_move_to_extended(dev, 0, 99, 50, 20, 50, axes, 20); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -1896,7 +1894,7 @@ START_TEST(touchpad_palm_detect_pressure_after_dwt) /* within dwt timeout, dwt blocks events */ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to_extended(touchpad, 0, 50, 50, 20, 50, axes, 20, 0); + litest_touch_move_to_extended(touchpad, 0, 50, 50, 20, 50, axes, 20); litest_assert_empty_queue(li); litest_timeout_dwt_short(); @@ -1904,7 +1902,7 @@ START_TEST(touchpad_palm_detect_pressure_after_dwt) litest_assert_empty_queue(li); /* after dwt timeout, pressure blocks events */ - litest_touch_move_to_extended(touchpad, 0, 20, 50, 50, 50, axes, 20, 0); + litest_touch_move_to_extended(touchpad, 0, 20, 50, 50, 50, axes, 20); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -2599,7 +2597,7 @@ START_TEST(touchpad_semi_mt_hover_down_hover_down) litest_touch_down(dev, 0, 50, 50); litest_event(dev, EV_ABS, ABS_PRESSURE, 50); litest_pop_event_frame(dev); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 10); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -2797,7 +2795,7 @@ START_TEST(touchpad_hover_noevent) litest_drain_events(li); litest_hover_start(dev, 0, 50, 50); - litest_hover_move_to(dev, 0, 50, 50, 70, 70, 10, 10); + litest_hover_move_to(dev, 0, 50, 50, 70, 70, 10); litest_hover_end(dev, 0); litest_assert_empty_queue(li); @@ -2814,19 +2812,19 @@ START_TEST(touchpad_hover_down) /* hover the finger */ litest_hover_start(dev, 0, 50, 50); - litest_hover_move_to(dev, 0, 50, 50, 70, 70, 10, 10); + litest_hover_move_to(dev, 0, 50, 50, 70, 70, 10); litest_assert_empty_queue(li); /* touch the finger on the sensor */ - litest_touch_move_to(dev, 0, 70, 70, 50, 50, 10, 10); + litest_touch_move_to(dev, 0, 70, 70, 50, 50, 10); libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); /* go back to hover */ - litest_hover_move_to(dev, 0, 50, 50, 70, 70, 10, 10); + litest_hover_move_to(dev, 0, 50, 50, 70, 70, 10); litest_hover_end(dev, 0); litest_assert_empty_queue(li); @@ -2846,12 +2844,12 @@ START_TEST(touchpad_hover_down_hover_down) for (i = 0; i < 3; i++) { /* hover the finger */ - litest_hover_move_to(dev, 0, 50, 50, 70, 70, 10, 10); + litest_hover_move_to(dev, 0, 50, 50, 70, 70, 10); litest_assert_empty_queue(li); /* touch the finger */ - litest_touch_move_to(dev, 0, 70, 70, 50, 50, 10, 10); + litest_touch_move_to(dev, 0, 70, 70, 50, 50, 10); libinput_dispatch(li); @@ -2863,7 +2861,7 @@ START_TEST(touchpad_hover_down_hover_down) /* start a new touch to be sure */ litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 10); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -2896,7 +2894,7 @@ START_TEST(touchpad_hover_down_up) litest_assert_empty_queue(li); /* now move the finger */ - litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10, 10); + litest_touch_move_to(dev, 0, 50, 50, 70, 70, 10); litest_touch_up(dev, 0); @@ -2917,7 +2915,7 @@ START_TEST(touchpad_hover_2fg_noevent) litest_hover_start(dev, 1, 50, 50); litest_pop_event_frame(dev); - litest_hover_move_two_touches(dev, 25, 25, 50, 50, 50, 50, 10, 0); + litest_hover_move_two_touches(dev, 25, 25, 50, 50, 50, 50, 10); litest_push_event_frame(dev); litest_hover_end(dev, 0); @@ -3161,7 +3159,7 @@ START_TEST(touchpad_trackpoint_buttons_2fg_scroll) litest_touch_down(touchpad, 0, 49, 70); litest_touch_down(touchpad, 1, 51, 70); - litest_touch_move_two_touches(touchpad, 49, 70, 51, 70, 0, -40, 10, 0); + litest_touch_move_two_touches(touchpad, 49, 70, 51, 70, 0, -40, 10); libinput_dispatch(li); litest_wait_for_event(li); @@ -3182,8 +3180,8 @@ START_TEST(touchpad_trackpoint_buttons_2fg_scroll) BTN_RIGHT, LIBINPUT_BUTTON_STATE_PRESSED); - litest_touch_move_to(touchpad, 0, 40, 30, 40, 70, 10, 0); - litest_touch_move_to(touchpad, 1, 60, 30, 60, 70, 10, 0); + litest_touch_move_to(touchpad, 0, 40, 30, 40, 70, 10); + litest_touch_move_to(touchpad, 1, 60, 30, 60, 70, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); @@ -3208,11 +3206,11 @@ START_TEST(touchpad_trackpoint_buttons_2fg_scroll) litest_assert_scroll() which tests for the trailing 0/0 scroll for us. */ - litest_touch_move_to(touchpad, 0, 40, 70, 40, 60, 10, 0); - litest_touch_move_to(touchpad, 1, 60, 70, 60, 60, 10, 0); + litest_touch_move_to(touchpad, 0, 40, 70, 40, 60, 10); + litest_touch_move_to(touchpad, 1, 60, 70, 60, 60, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); - litest_touch_move_to(touchpad, 0, 40, 60, 40, 30, 10, 0); - litest_touch_move_to(touchpad, 1, 60, 60, 60, 30, 10, 0); + litest_touch_move_to(touchpad, 0, 40, 60, 40, 30, 10); + litest_touch_move_to(touchpad, 1, 60, 60, 60, 30, 10); litest_touch_up(touchpad, 0); litest_touch_up(touchpad, 1); @@ -3277,7 +3275,7 @@ START_TEST(touchpad_initial_state) else y = 30; litest_touch_down(dev, 0, x, y); - litest_touch_move_to(dev, 0, x, y, 70, 70, 10, 10); + litest_touch_move_to(dev, 0, x, y, 70, 70, 10); litest_touch_up(dev, 0); libinput_dispatch(libinput1); libinput_dispatch(libinput2); @@ -3324,7 +3322,7 @@ START_TEST(touchpad_dwt) litest_keyboard_key(keyboard, KEY_A, false); libinput_dispatch(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); @@ -3334,7 +3332,7 @@ START_TEST(touchpad_dwt) /* after timeout - motion events*/ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -3365,7 +3363,7 @@ START_TEST(touchpad_dwt_ext_and_int_keyboard) litest_keyboard_key(keyboard, KEY_A, false); libinput_dispatch(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); @@ -3375,7 +3373,7 @@ START_TEST(touchpad_dwt_ext_and_int_keyboard) /* after timeout - motion events*/ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -3407,14 +3405,14 @@ START_TEST(touchpad_dwt_enable_touch) we're still within timeout - no events */ msleep(10); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_assert_empty_queue(li); litest_timeout_dwt_short(); libinput_dispatch(li); /* same touch after timeout - motion events*/ - litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 10, 1); + litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -3439,20 +3437,20 @@ START_TEST(touchpad_dwt_touch_hold) litest_keyboard_key(keyboard, KEY_A, true); msleep(1); /* make sure touch starts after key press */ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); /* touch still down - no events */ litest_keyboard_key(keyboard, KEY_A, false); libinput_dispatch(li); - litest_touch_move_to(touchpad, 0, 70, 50, 30, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 70, 50, 30, 50, 5); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); /* touch still down - no events */ litest_timeout_dwt_short(); libinput_dispatch(li); - litest_touch_move_to(touchpad, 0, 30, 50, 50, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 30, 50, 50, 50, 5); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -3476,7 +3474,7 @@ START_TEST(touchpad_dwt_key_hold) litest_keyboard_key(keyboard, KEY_A, true); libinput_dispatch(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); @@ -3506,7 +3504,7 @@ START_TEST(touchpad_dwt_key_hold_timeout) litest_timeout_dwt_long(); libinput_dispatch(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -3515,7 +3513,7 @@ START_TEST(touchpad_dwt_key_hold_timeout) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); /* key is up, but still within timeout */ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -3523,7 +3521,7 @@ START_TEST(touchpad_dwt_key_hold_timeout) litest_timeout_dwt_long(); libinput_dispatch(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -3557,14 +3555,14 @@ START_TEST(touchpad_dwt_key_hold_timeout_existing_touch_cornercase) /* Touch starting after re-issuing the dwt timeout */ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_assert_empty_queue(li); litest_keyboard_key(keyboard, KEY_A, false); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); /* key is up, but still within timeout */ - litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5); litest_assert_empty_queue(li); /* Expire dwt timeout. Because the touch started after re-issuing @@ -3575,7 +3573,7 @@ START_TEST(touchpad_dwt_key_hold_timeout_existing_touch_cornercase) * expect. But it's hard to trigger in real life too. */ litest_timeout_dwt_long(); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); /* If the below check for motion event fails because no events are * in the pipe, the buggy behavior was fixed and this test case @@ -3603,7 +3601,7 @@ START_TEST(touchpad_dwt_key_hold_timeout_existing_touch) libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); libinput_dispatch(li); litest_timeout_dwt_long(); libinput_dispatch(li); @@ -3613,12 +3611,12 @@ START_TEST(touchpad_dwt_key_hold_timeout_existing_touch) litest_keyboard_key(keyboard, KEY_A, false); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); /* key is up, but still within timeout */ - litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5); litest_assert_empty_queue(li); /* expire timeout, but touch started before release */ litest_timeout_dwt_long(); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -3649,14 +3647,14 @@ START_TEST(touchpad_dwt_type) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); litest_timeout_dwt_long(); libinput_dispatch(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -3687,14 +3685,14 @@ START_TEST(touchpad_dwt_type_short_timeout) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); litest_timeout_dwt_short(); libinput_dispatch(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -3738,7 +3736,7 @@ START_TEST(touchpad_dwt_modifier_no_dwt) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -3787,7 +3785,7 @@ START_TEST(touchpad_dwt_modifier_combo_no_dwt) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -3837,7 +3835,7 @@ START_TEST(touchpad_dwt_modifier_combo_dwt_after) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -3898,7 +3896,7 @@ START_TEST(touchpad_dwt_modifier_combo_dwt_remains) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -3936,7 +3934,7 @@ START_TEST(touchpad_dwt_fkeys_no_dwt) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -3994,14 +3992,14 @@ START_TEST(touchpad_dwt_tap_drag) litest_touch_down(touchpad, 0, 50, 50); litest_touch_up(touchpad, 0); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_keyboard_key(keyboard, KEY_A, false); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_timeout_dwt_short(); libinput_dispatch(li); - litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5, 1); + litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -4073,11 +4071,11 @@ START_TEST(touchpad_dwt_edge_scroll) libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); - litest_touch_move_to(touchpad, 0, 99, 20, 99, 80, 60, 10); + litest_touch_move_to(touchpad, 0, 99, 20, 99, 80, 60); libinput_dispatch(li); litest_assert_empty_queue(li); - litest_touch_move_to(touchpad, 0, 99, 80, 99, 20, 60, 10); + litest_touch_move_to(touchpad, 0, 99, 80, 99, 20, 60); litest_touch_up(touchpad, 0); libinput_dispatch(li); litest_assert_empty_queue(li); @@ -4104,7 +4102,7 @@ START_TEST(touchpad_dwt_edge_scroll_interrupt) litest_touch_down(touchpad, 0, 99, 20); libinput_dispatch(li); litest_timeout_edgescroll(); - litest_touch_move_to(touchpad, 0, 99, 20, 99, 30, 10, 10); + litest_touch_move_to(touchpad, 0, 99, 20, 99, 30, 10); libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); @@ -4128,7 +4126,7 @@ START_TEST(touchpad_dwt_edge_scroll_interrupt) * pointer-moving touch once the timeout expires. We'll fix that * when we need to. */ - litest_touch_move_to(touchpad, 0, 99, 30, 99, 80, 10, 5); + litest_touch_move_to(touchpad, 0, 99, 30, 99, 80, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_delete_device(keyboard); @@ -4231,7 +4229,7 @@ START_TEST(touchpad_dwt_disabled) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -4264,7 +4262,7 @@ START_TEST(touchpad_dwt_disable_during_touch) litest_keyboard_key(keyboard, KEY_A, false); litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_assert_empty_queue(li); litest_timeout_dwt_long(); @@ -4273,7 +4271,7 @@ START_TEST(touchpad_dwt_disable_during_touch) disable_dwt(touchpad); /* touch already down -> keeps being ignored */ - litest_touch_move_to(touchpad, 0, 70, 50, 50, 70, 10, 0); + litest_touch_move_to(touchpad, 0, 70, 50, 50, 70, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -4306,7 +4304,7 @@ START_TEST(touchpad_dwt_disable_before_touch) /* touch down during timeout -> still discarded */ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_assert_empty_queue(li); litest_delete_device(keyboard); @@ -4340,7 +4338,7 @@ START_TEST(touchpad_dwt_disable_during_key_release) litest_touch_down(touchpad, 0, 50, 50); libinput_dispatch(li); litest_timeout_dwt_long(); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_delete_device(keyboard); @@ -4372,7 +4370,7 @@ START_TEST(touchpad_dwt_disable_during_key_hold) litest_touch_down(touchpad, 0, 50, 50); libinput_dispatch(li); litest_timeout_dwt_long(); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_delete_device(keyboard); @@ -4399,13 +4397,13 @@ START_TEST(touchpad_dwt_enable_during_touch) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); enable_dwt(touchpad); /* touch already down -> still sends events */ - litest_touch_move_to(touchpad, 0, 70, 50, 50, 70, 10, 0); + litest_touch_move_to(touchpad, 0, 70, 50, 50, 70, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -4436,7 +4434,7 @@ START_TEST(touchpad_dwt_enable_before_touch) libinput_dispatch(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_delete_device(keyboard); @@ -4473,7 +4471,7 @@ START_TEST(touchpad_dwt_enable_during_tap) litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_BUTTON); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -4510,12 +4508,12 @@ START_TEST(touchpad_dwt_remove_kbd_while_active) litest_delete_device(keyboard); litest_drain_events(li); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -4538,7 +4536,7 @@ START_TEST(touchpad_dwt_apple) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); libinput_dispatch(li); litest_assert_empty_queue(li); @@ -4564,7 +4562,7 @@ START_TEST(touchpad_dwt_acer_hawaii) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -4576,7 +4574,7 @@ START_TEST(touchpad_dwt_acer_hawaii) litest_assert_only_typed_events(li, LIBINPUT_EVENT_KEYBOARD_KEY); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); libinput_dispatch(li); litest_assert_empty_queue(li); @@ -4604,7 +4602,7 @@ START_TEST(touchpad_dwt_multiple_keyboards) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -4615,7 +4613,7 @@ START_TEST(touchpad_dwt_multiple_keyboards) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -4646,7 +4644,7 @@ START_TEST(touchpad_dwt_multiple_keyboards_bothkeys) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -4681,7 +4679,7 @@ START_TEST(touchpad_dwt_multiple_keyboards_bothkeys_modifier) * ctrl+B across two devices is *not* a dwt modifier combo */ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -4724,7 +4722,7 @@ START_TEST(touchpad_dwt_multiple_keyboards_remove) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -4763,7 +4761,7 @@ START_TEST(touchpad_thumb_begin_no_motion) litest_drain_events(li); litest_touch_down_extended(dev, 0, 50, 99, axes); - litest_touch_move_to(dev, 0, 50, 99, 80, 99, 10, 0); + litest_touch_move_to(dev, 0, 50, 99, 80, 99, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -4789,7 +4787,7 @@ START_TEST(touchpad_thumb_update_no_motion) litest_touch_down(dev, 0, 59, 99); litest_touch_move_extended(dev, 0, 59, 99, axes); - litest_touch_move_to(dev, 0, 60, 99, 80, 99, 10, 0); + litest_touch_move_to(dev, 0, 60, 99, 80, 99, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -4814,9 +4812,9 @@ START_TEST(touchpad_thumb_moving) litest_drain_events(li); litest_touch_down(dev, 0, 50, 99); - litest_touch_move_to(dev, 0, 50, 99, 60, 99, 10, 0); + litest_touch_move_to(dev, 0, 50, 99, 60, 99, 10); litest_touch_move_extended(dev, 0, 65, 99, axes); - litest_touch_move_to(dev, 0, 65, 99, 80, 99, 10, 0); + litest_touch_move_to(dev, 0, 65, 99, 80, 99, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -4838,7 +4836,7 @@ START_TEST(touchpad_thumb_moving_empty_slots) /* exceed the speed movement threshold in slot 0 */ litest_touch_down(dev, 0, 50, 20); - litest_touch_move_to(dev, 0, 50, 20, 70, 99, 15, 0); + litest_touch_move_to(dev, 0, 50, 20, 70, 99, 15); litest_touch_up(dev, 0); litest_drain_events(li); @@ -4848,8 +4846,8 @@ START_TEST(touchpad_thumb_moving_empty_slots) litest_touch_down(dev, 2, 90, 50); libinput_dispatch(li); for (int i = 0, y = 50; i < 10; i++, y++) { - litest_touch_move_to(dev, 1, 50, y, 50, y + 1, 1, 0); - litest_touch_move_to(dev, 2, 50, y, 50, y + 1, 1, 0); + litest_touch_move_to(dev, 1, 50, y, 50, y + 1, 1); + litest_touch_move_to(dev, 2, 50, y, 50, y + 1, 1); } libinput_dispatch(li); litest_touch_up(dev, 1); @@ -5442,7 +5440,7 @@ START_TEST(touchpad_slot_swap) litest_touch_down(dev, 1, 70, 70); libinput_dispatch(li); - litest_touch_move_to(dev, first, 50, 50, 50, 30, 10, 1); + litest_touch_move_to(dev, first, 50, 50, 50, 30, 10); litest_drain_events(li); /* release touch 0, continue other slot with 0's coords */ @@ -5451,7 +5449,7 @@ START_TEST(touchpad_slot_swap) litest_touch_move(dev, second, 50, 30.1); litest_pop_event_frame(dev); libinput_dispatch(li); - litest_touch_move_to(dev, second, 50, 30, 50, 11, 10, 1); + litest_touch_move_to(dev, second, 50, 30, 50, 11, 10); libinput_dispatch(li); event = libinput_get_event(li); do { @@ -5484,7 +5482,7 @@ START_TEST(touchpad_finger_always_down) litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(dev, 0, 50, 50, 70, 50, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -5504,7 +5502,7 @@ START_TEST(touchpad_time_usec) litest_drain_events(li); litest_touch_down(dev, 0, 50, 50); - litest_touch_move_to(dev, 0, 50, 50, 80, 50, 20, 10); + litest_touch_move_to(dev, 0, 50, 50, 80, 50, 20); litest_touch_up(dev, 0); libinput_dispatch(li); @@ -5534,17 +5532,17 @@ START_TEST(touchpad_jump_finger_motion) struct libinput_event_pointer *ptrev; litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_drain_events(li); /* this test uses a specific test device to trigger a >20mm jump to * test jumps. These numbers may not work on any other device */ litest_disable_log_handler(li); - litest_touch_move_to(dev, 0, 90, 30, 20, 80, 1, 0); + litest_touch_move_to(dev, 0, 90, 30, 20, 80, 1); litest_assert_empty_queue(li); litest_restore_log_handler(li); - litest_touch_move_to(dev, 0, 20, 80, 21, 81, 10, 0); + litest_touch_move_to(dev, 0, 20, 80, 21, 81, 10); litest_touch_up(dev, 0); /* expect lots of little events, no big jump */ @@ -5573,7 +5571,7 @@ START_TEST(touchpad_jump_delta) struct libinput_event_pointer *ptrev; litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_drain_events(li); /* this test uses a specific test device to trigger a >7mm but <20mm @@ -5584,7 +5582,7 @@ START_TEST(touchpad_jump_delta) litest_assert_empty_queue(li); litest_restore_log_handler(li); - litest_touch_move_to(dev, 0, 90, 88, 91, 89, 10, 0); + litest_touch_move_to(dev, 0, 90, 88, 91, 89, 10); litest_touch_up(dev, 0); /* expect lots of little events, no big jump */ @@ -5620,7 +5618,7 @@ START_TEST(touchpad_disabled_on_mouse) ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -5628,7 +5626,7 @@ START_TEST(touchpad_disabled_on_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_ADDED); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -5636,7 +5634,7 @@ START_TEST(touchpad_disabled_on_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_REMOVED); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -5657,7 +5655,7 @@ START_TEST(touchpad_disabled_on_mouse_suspend_mouse) ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -5671,7 +5669,7 @@ START_TEST(touchpad_disabled_on_mouse_suspend_mouse) ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -5679,7 +5677,7 @@ START_TEST(touchpad_disabled_on_mouse_suspend_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_REMOVED); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -5700,7 +5698,7 @@ START_TEST(touchpad_disabled_double_mouse) ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -5709,7 +5707,7 @@ START_TEST(touchpad_disabled_double_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_ADDED); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -5717,7 +5715,7 @@ START_TEST(touchpad_disabled_double_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_REMOVED); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -5725,7 +5723,7 @@ START_TEST(touchpad_disabled_double_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_REMOVED); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -5746,7 +5744,7 @@ START_TEST(touchpad_disabled_double_mouse_one_suspended) ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -5761,7 +5759,7 @@ START_TEST(touchpad_disabled_double_mouse_one_suspended) ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -5769,7 +5767,7 @@ START_TEST(touchpad_disabled_double_mouse_one_suspended) litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_REMOVED); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); @@ -5777,7 +5775,7 @@ START_TEST(touchpad_disabled_double_mouse_one_suspended) litest_assert_only_typed_events(li, LIBINPUT_EVENT_DEVICE_REMOVED); litest_touch_down(dev, 0, 20, 30); - litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10, 0); + litest_touch_move_to(dev, 0, 20, 30, 90, 30, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -5819,10 +5817,8 @@ START_TEST(touchpad_pressure) litest_axis_set_value(axes, ABS_MT_PRESSURE, pressure); litest_axis_set_value(axes, ABS_PRESSURE, pressure); litest_touch_down_extended(dev, 0, 50, 50, axes); - litest_touch_move_to_extended(dev, 0, - 50, 50, - 80, 80, - axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 80, 80, axes, + 10); litest_touch_up(dev, 0); if (pressure < threshold) litest_assert_empty_queue(li); @@ -5852,20 +5848,14 @@ START_TEST(touchpad_pressure_2fg) litest_touch_down(dev, 0, 30, 50); litest_touch_down_extended(dev, 1, 50, 50, axes); libinput_dispatch(li); - litest_touch_move_to(dev, 0, 50, 50, 80, 80, 10, 1); + litest_touch_move_to(dev, 0, 50, 50, 80, 80, 10); libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); - litest_touch_move_to_extended(dev, 1, - 50, 50, - 80, 80, - axes, 10, 1); + litest_touch_move_to_extended(dev, 1, 50, 50, 80, 80, axes, 10); litest_assert_empty_queue(li); - litest_touch_move_to(dev, 0, 80, 80, 20, 50, 10, 1); - litest_touch_move_to_extended(dev, 1, - 80, 80, - 50, 50, - axes, 10, 1); + litest_touch_move_to(dev, 0, 80, 80, 20, 50, 10); + litest_touch_move_to_extended(dev, 1, 80, 80, 50, 50, axes, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -5900,10 +5890,7 @@ START_TEST(touchpad_pressure_2fg_st) litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 1); litest_event(dev, EV_SYN, SYN_REPORT, 0); libinput_dispatch(li); - litest_touch_move_to_extended(dev, 0, - 50, 50, - 80, 80, - axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 80, 80, axes, 10); litest_assert_empty_queue(li); } END_TEST @@ -6039,7 +6026,7 @@ START_TEST(touchpad_pressure_btntool) libinput_dispatch(li); /* make one finger real */ - litest_touch_move_to(dev, 0, 40, 50, 41, 52, 10, 10); + litest_touch_move_to(dev, 0, 40, 50, 41, 52, 10); litest_drain_events(li); /* tripletap should now be 3 fingers tap */ @@ -6079,7 +6066,7 @@ START_TEST(touchpad_pressure_semi_mt_2fg_goes_light) litest_touch_down(dev, 0, 40, 50); litest_touch_down(dev, 1, 60, 50); - litest_touch_move_two_touches(dev, 40, 50, 60, 50, 0, -20, 10, 0); + litest_touch_move_two_touches(dev, 40, 50, 60, 50, 0, -20, 10); /* This should trigger a scroll end event */ litest_push_event_frame(dev); @@ -6123,20 +6110,14 @@ START_TEST(touchpad_touch_size) litest_axis_set_value(axes, ABS_MT_TOUCH_MAJOR, 1); litest_axis_set_value(axes, ABS_MT_TOUCH_MINOR, 1); litest_touch_down_extended(dev, 0, 50, 50, axes); - litest_touch_move_to_extended(dev, 0, - 50, 50, - 80, 80, - axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 80, 80, axes, 10); litest_touch_up(dev, 0); litest_assert_empty_queue(li); litest_axis_set_value(axes, ABS_MT_TOUCH_MAJOR, 15); litest_axis_set_value(axes, ABS_MT_TOUCH_MINOR, 15); litest_touch_down_extended(dev, 0, 50, 50, axes); - litest_touch_move_to_extended(dev, 0, - 50, 50, - 80, 80, - axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 80, 80, axes, 10); litest_touch_up(dev, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -6161,10 +6142,7 @@ START_TEST(touchpad_touch_size_2fg) litest_axis_set_value(axes, ABS_MT_TOUCH_MAJOR, 15); litest_axis_set_value(axes, ABS_MT_TOUCH_MINOR, 15); litest_touch_down_extended(dev, 0, 50, 50, axes); - litest_touch_move_to_extended(dev, 0, - 50, 50, - 80, 80, - axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 80, 80, axes, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -6172,18 +6150,12 @@ START_TEST(touchpad_touch_size_2fg) litest_axis_set_value(axes, ABS_MT_TOUCH_MAJOR, 1); litest_axis_set_value(axes, ABS_MT_TOUCH_MINOR, 1); litest_touch_down_extended(dev, 1, 70, 70, axes); - litest_touch_move_to_extended(dev, 1, - 70, 70, - 80, 90, - axes, 10, 1); + litest_touch_move_to_extended(dev, 1, 70, 70, 80, 90, axes, 10); litest_assert_empty_queue(li); litest_axis_set_value(axes, ABS_MT_TOUCH_MAJOR, 15); litest_axis_set_value(axes, ABS_MT_TOUCH_MINOR, 15); - litest_touch_move_to_extended(dev, 0, - 80, 80, - 50, 50, - axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 80, 80, 50, 50, axes, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -6211,19 +6183,13 @@ START_TEST(touchpad_palm_detect_touch_size) litest_axis_set_value(axes, ABS_MT_TOUCH_MAJOR, 30); litest_axis_set_value(axes, ABS_MT_TOUCH_MINOR, 30); litest_touch_down_extended(dev, 0, 50, 50, axes); - litest_touch_move_to_extended(dev, 0, - 50, 50, - 80, 80, - axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 50, 50, 80, 80, axes, 10); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_axis_set_value_unchecked(axes, ABS_MT_TOUCH_MAJOR, 90); litest_axis_set_value(axes, ABS_MT_TOUCH_MINOR, 90); - litest_touch_move_to_extended(dev, 0, - 80, 80, - 50, 50, - axes, 10, 1); + litest_touch_move_to_extended(dev, 0, 80, 80, 50, 50, axes, 10); litest_assert_empty_queue(li); } END_TEST @@ -6239,9 +6205,9 @@ START_TEST(touchpad_speed_ignore_finger) litest_drain_events(li); litest_touch_down(dev, 0, 20, 20); - litest_touch_move_to(dev, 0, 20, 20, 85, 80, 20, 0); + litest_touch_move_to(dev, 0, 20, 20, 85, 80, 20); litest_touch_down(dev, 1, 20, 80); - litest_touch_move_two_touches(dev, 85, 80, 20, 80, -20, -20, 10, 0); + litest_touch_move_two_touches(dev, 85, 80, 20, 80, -20, -20, 10); libinput_dispatch(li); litest_touch_up(dev, 0); @@ -6267,10 +6233,10 @@ START_TEST(touchpad_speed_allow_nearby_finger) litest_drain_events(li); litest_touch_down(dev, 0, 20, 20); - litest_touch_move_to(dev, 0, 20, 20, 80, 80, 20, 0); + litest_touch_move_to(dev, 0, 20, 20, 80, 80, 20); litest_drain_events(li); litest_touch_down(dev, 1, 79, 80); - litest_touch_move_two_touches(dev, 80, 80, 79, 80, -20, -20, 10, 0); + litest_touch_move_two_touches(dev, 80, 80, 79, 80, -20, -20, 10); libinput_dispatch(li); litest_touch_up(dev, 0); @@ -6292,10 +6258,10 @@ START_TEST(touchpad_speed_ignore_finger_edgescroll) litest_drain_events(li); litest_touch_down(dev, 0, 20, 20); - litest_touch_move_to(dev, 0, 20, 20, 60, 80, 20, 0); + litest_touch_move_to(dev, 0, 20, 20, 60, 80, 20); litest_drain_events(li); litest_touch_down(dev, 1, 59, 80); - litest_touch_move_two_touches(dev, 60, 80, 59, 80, -20, -20, 10, 0); + litest_touch_move_two_touches(dev, 60, 80, 59, 80, -20, -20, 10); libinput_dispatch(li); litest_touch_up(dev, 0); @@ -6320,7 +6286,7 @@ assert_touchpad_moves(struct litest_device *tp) struct libinput *li = tp->libinput; litest_touch_down(tp, 0, 50, 50); - litest_touch_move_to(tp, 0, 50, 50, 60, 80, 20, 0); + litest_touch_move_to(tp, 0, 50, 50, 60, 80, 20); litest_touch_up(tp, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); } @@ -6331,7 +6297,7 @@ assert_touchpad_does_not_move(struct litest_device *tp) struct libinput *li = tp->libinput; litest_touch_down(tp, 0, 20, 20); - litest_touch_move_to(tp, 0, 20, 20, 60, 80, 20, 0); + litest_touch_move_to(tp, 0, 20, 20, 60, 80, 20); litest_touch_up(tp, 0); litest_assert_empty_queue(li); } diff --git a/test/test-trackpoint.c b/test/test-trackpoint.c index 1f823331..b62a16fe 100644 --- a/test/test-trackpoint.c +++ b/test/test-trackpoint.c @@ -304,7 +304,7 @@ START_TEST(trackpoint_palmdetect) litest_drain_events(li); litest_touch_down(touchpad, 0, 30, 30); - litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -312,7 +312,7 @@ START_TEST(trackpoint_palmdetect) libinput_dispatch(li); litest_touch_down(touchpad, 0, 30, 30); - litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -339,14 +339,14 @@ START_TEST(trackpoint_palmdetect_resume_touch) litest_drain_events(li); litest_touch_down(touchpad, 0, 30, 30); - litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10); litest_assert_empty_queue(li); litest_timeout_trackpoint(); libinput_dispatch(li); /* touch started after last tp event, expect resume */ - litest_touch_move_to(touchpad, 0, 80, 80, 30, 30, 10, 1); + litest_touch_move_to(touchpad, 0, 80, 80, 30, 30, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -371,7 +371,7 @@ START_TEST(trackpoint_palmdetect_require_min_events) litest_drain_events(li); litest_touch_down(touchpad, 0, 30, 30); - litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -397,7 +397,7 @@ START_TEST(trackpoint_palmdetect_require_min_events_timeout) litest_drain_events(li); litest_touch_down(touchpad, 0, 30, 30); - litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10, 1); + litest_touch_move_to(touchpad, 0, 30, 30, 80, 80, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);