[PATCH libinput 2/3] test: change the matrix delta test to use a tip-down event

Peter Hutterer peter.hutterer at who-t.net
Mon Aug 29 08:22:00 UTC 2016


Makes the test suitable for tablets without proximity capabilities.

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

diff --git a/test/tablet.c b/test/tablet.c
index d2f710f..7bf6ac6 100644
--- a/test/tablet.c
+++ b/test/tablet.c
@@ -2766,8 +2766,8 @@ START_TEST(tablet_calibration_set_matrix_delta)
 	struct libinput_event *event;
 	struct libinput_event_tablet_tool *tablet_event;
 	struct axis_replacement axes[] = {
-		{ ABS_DISTANCE, 10 },
-		{ ABS_PRESSURE, 0 },
+		{ ABS_DISTANCE, 0 },
+		{ ABS_PRESSURE, 10 },
 		{ -1, -1 }
 	};
 	int has_calibration;
@@ -2788,6 +2788,11 @@ START_TEST(tablet_calibration_set_matrix_delta)
 	y = libinput_event_tablet_tool_get_y(tablet_event);
 	libinput_event_destroy(event);
 
+	event = libinput_get_event(li);
+	tablet_event = litest_is_tablet_event(event,
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
+	libinput_event_destroy(event);
+
 	litest_tablet_motion(dev, 80, 80, axes);
 	libinput_dispatch(li);
 
@@ -2814,6 +2819,11 @@ START_TEST(tablet_calibration_set_matrix_delta)
 	y = libinput_event_tablet_tool_get_y(tablet_event);
 	libinput_event_destroy(event);
 
+	event = libinput_get_event(li);
+	tablet_event = litest_is_tablet_event(event,
+					      LIBINPUT_EVENT_TABLET_TOOL_TIP);
+	libinput_event_destroy(event);
+
 	litest_tablet_motion(dev, 80, 80, axes);
 	libinput_dispatch(li);
 
-- 
2.7.4



More information about the wayland-devel mailing list