[PATCH libinput 1/5] test: switch touch points around for semi-mt tap-n-drag testing

Peter Hutterer peter.hutterer at who-t.net
Thu Dec 18 15:24:50 PST 2014


The tests ignored it when motion events never happened - but that's mostly
what these tests are about. This only happened for semi-mt devices that use
the bounding box only, not separate touch points. Switching the touch points
around that the bounding box doesn't interfere causes the test to work as
expected.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/touchpad.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/touchpad.c b/test/touchpad.c
index 84b3080..e6f0eb6 100644
--- a/test/touchpad.c
+++ b/test/touchpad.c
@@ -211,11 +211,11 @@ START_TEST(touchpad_2fg_tap_n_drag)
 
 	litest_drain_events(li);
 
-	litest_touch_down(dev, 0, 50, 50);
+	litest_touch_down(dev, 0, 30, 70);
 	litest_touch_up(dev, 0);
-	litest_touch_down(dev, 0, 50, 50);
-	litest_touch_down(dev, 1, 60, 50);
-	litest_touch_move_to(dev, 0, 50, 50, 80, 80, 5, 40);
+	litest_touch_down(dev, 0, 30, 70);
+	litest_touch_down(dev, 1, 80, 70);
+	litest_touch_move_to(dev, 0, 30, 70, 30, 30, 5, 40);
 	libinput_dispatch(li);
 
 	litest_assert_button_event(li, BTN_LEFT,
@@ -250,11 +250,11 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg_btntool)
 
 	litest_drain_events(li);
 
-	litest_touch_down(dev, 0, 50, 50);
+	litest_touch_down(dev, 0, 30, 70);
 	litest_touch_up(dev, 0);
-	litest_touch_down(dev, 0, 50, 50);
-	litest_touch_down(dev, 1, 60, 50);
-	litest_touch_move_to(dev, 0, 50, 50, 80, 80, 5, 40);
+	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);
 	libinput_dispatch(li);
 
 	litest_assert_button_event(li, BTN_LEFT,
-- 
2.1.0



More information about the wayland-devel mailing list