test: change the matrix delta test to use a tip-down event

Makes the test suitable for tablets without proximity capabilities.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
This commit is contained in:
Peter Hutterer 2016-08-23 08:00:15 +10:00
parent 9550cd47b2
commit 3ceb6aeb8c

View file

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