[PATCH libinput 3/8] test: add printing of tablet events to litest
Peter Hutterer
peter.hutterer at who-t.net
Wed Nov 11 13:12:57 PST 2015
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
test/litest.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/test/litest.c b/test/litest.c
index d10175f..ce2a6a7 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -1898,6 +1898,7 @@ static void
litest_print_event(struct libinput_event *event)
{
struct libinput_event_pointer *p;
+ struct libinput_event_tablet *t;
struct libinput_device *dev;
enum libinput_event_type type;
double x, y;
@@ -1943,6 +1944,17 @@ litest_print_event(struct libinput_event *event)
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL);
fprintf(stderr, "vert %.f horiz %.2f", y, x);
break;
+ case LIBINPUT_EVENT_TABLET_PROXIMITY:
+ t = libinput_event_get_tablet_event(event);
+ fprintf(stderr, "proximity %d\n",
+ libinput_event_tablet_get_proximity_state(t));
+ break;
+ case LIBINPUT_EVENT_TABLET_BUTTON:
+ t = libinput_event_get_tablet_event(event);
+ fprintf(stderr, "button %d state %d\n",
+ libinput_event_tablet_get_button(t),
+ libinput_event_tablet_get_button_state(t));
+ break;
default:
break;
}
--
2.4.3
More information about the wayland-devel
mailing list