diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-09-11 08:43:58 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-09-22 17:35:41 +1000 |
commit | df2759706fc83e9cedc8c9101f9e94e9c9a00682 (patch) | |
tree | 3ecd5d5f78f9c8f123b09ebc33b6a34816144cd1 /test/litest-device-wacom-hid4800-pen.c | |
parent | 06e7adfca39d7ff4f557163e5ffa002026f969d3 (diff) | |
download | libinput-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-wacom-hid4800-pen.c')
-rw-r--r-- | test/litest-device-wacom-hid4800-pen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/litest-device-wacom-hid4800-pen.c b/test/litest-device-wacom-hid4800-pen.c index 3f424851..85f091be 100644 --- a/test/litest-device-wacom-hid4800-pen.c +++ b/test/litest-device-wacom-hid4800-pen.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_MSC, .code = MSC_SERIAL, .value = 297797542 }, { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, { .type = -1, .code = -1 }, @@ -40,7 +40,7 @@ static struct input_event proximity_out[] = { { .type = EV_ABS, .code = ABS_X, .value = 0 }, { .type = EV_ABS, .code = ABS_Y, .value = 0 }, { .type = EV_MSC, .code = MSC_SERIAL, .value = 297797542 }, - { .type = EV_KEY, .code = BTN_TOOL_PEN, .value = 0 }, + { .type = EV_KEY, .code = LITEST_BTN_TOOL_AUTO, .value = 0 }, { .type = EV_SYN, .code = SYN_REPORT, .value = 0 }, { .type = -1, .code = -1 }, }; |