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-int.h | |
parent | 06e7adfca39d7ff4f557163e5ffa002026f969d3 (diff) |
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-int.h')
-rw-r--r-- | test/litest-int.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/litest-int.h b/test/litest-int.h index c5b05e68..5bc62d9c 100644 --- a/test/litest-int.h +++ b/test/litest-int.h @@ -31,6 +31,9 @@ /* Use as designater for litest to change the value */ #define LITEST_AUTO_ASSIGN INT_MIN +/* Special event code to auto-assign the BTN_TOOL_PEN and friends */ +#define LITEST_BTN_TOOL_AUTO (KEY_MAX << 1) + struct litest_test_device { struct list node; /* global test device list */ @@ -129,6 +132,8 @@ struct litest_device_interface { int min[2]; /* x/y axis minimum */ int max[2]; /* x/y axis maximum */ + + unsigned int tool_type; }; struct path { |