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 <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-08-28 09:16:52 +10:00
parent 20a9c38db0
commit 7768d7d981
11 changed files with 394 additions and 453 deletions

View file

@ -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);

View file

@ -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,

View file

@ -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);
}

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

File diff suppressed because it is too large Load diff

View file

@ -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);