summaryrefslogtreecommitdiff
path: root/test/litest-device-huion-pentablet.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2020-09-11 08:43:58 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2020-09-22 17:35:41 +1000
commitdf2759706fc83e9cedc8c9101f9e94e9c9a00682 (patch)
tree3ecd5d5f78f9c8f123b09ebc33b6a34816144cd1 /test/litest-device-huion-pentablet.c
parent06e7adfca39d7ff4f557163e5ffa002026f969d3 (diff)
downloadlibinput-df2759706fc83e9cedc8c9101f9e94e9c9a00682.tar.gz
test: auto-assign the tool type for tablet tests
The current tool type test merely sends BTN_TOOL_RUBBER (and others) manually and expects libinput to do the right thing. This only tests the perfect sequence but not test weird devices that behave differently on a tool type switch. So let's fix this by setting the tool type as property on the libinput test device itself, and then emulate the tool switch through litest. For special devices this will need extra callbacks, this is just the initial framework to handle those buttons. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/litest-device-huion-pentablet.c')
-rw-r--r--test/litest-device-huion-pentablet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/litest-device-huion-pentablet.c b/test/litest-device-huion-pentablet.c
index 976d6708..8e81bc15 100644
--- a/test/litest-device-huion-pentablet.c
+++ b/test/litest-device-huion-pentablet.c
@@ -30,7 +30,7 @@ static struct input_event proximity_in[] = {
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
{ .type = EV_ABS, .code = ABS_PRESSURE, .value = LITEST_AUTO_ASSIGN },
- { .type = EV_KEY, .code = BTN_TOOL_PEN, .value = 1 },
+ { .type = EV_KEY, .code = LITEST_BTN_TOOL_AUTO, .value = 1 },
{ .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
{ .type = -1, .code = -1 },
};