diff --git a/test/litest.c b/test/litest.c index b3e7ba3d..1bb18dde 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1643,6 +1643,28 @@ litest_touch_move_to(struct litest_device *d, litest_touch_move(d, slot, x_to, y_to); } +void +litest_touch_move_to_extended(struct litest_device *d, + unsigned int slot, + double x_from, double y_from, + double x_to, double y_to, + struct axis_replacement *axes, + int steps, int sleep_ms) +{ + for (int i = 1; i < steps - 1; i++) { + litest_touch_move_extended(d, slot, + x_from + (x_to - x_from)/steps * i, + y_from + (y_to - y_from)/steps * i, + axes); + if (sleep_ms) { + libinput_dispatch(d->libinput); + msleep(sleep_ms); + libinput_dispatch(d->libinput); + } + } + litest_touch_move_extended(d, slot, x_to, y_to, axes); +} + static int auto_assign_tablet_value(struct litest_device *d, const struct input_event *ev, diff --git a/test/litest.h b/test/litest.h index e6d35a90..886337ba 100644 --- a/test/litest.h +++ b/test/litest.h @@ -437,6 +437,14 @@ litest_touch_move_to(struct litest_device *d, double x_to, double y_to, int steps, int sleep_ms); +void +litest_touch_move_to_extended(struct litest_device *d, + unsigned int slot, + double x_from, double y_from, + double x_to, double y_to, + struct axis_replacement *axes, + int steps, int sleep_ms); + void litest_touch_move_two_touches(struct litest_device *d, double x0, double y0,