tools: print device capabilities in event-debug

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2015-01-05 08:36:00 +10:00
parent 9c297aefae
commit f11cd30f00

View file

@ -130,6 +130,17 @@ print_device_notify(struct libinput_event *ev)
libinput_seat_get_physical_name(seat),
libinput_seat_get_logical_name(seat));
printf(" cap:");
if (libinput_device_has_capability(dev,
LIBINPUT_DEVICE_CAP_KEYBOARD))
printf("k");
if (libinput_device_has_capability(dev,
LIBINPUT_DEVICE_CAP_POINTER))
printf("p");
if (libinput_device_has_capability(dev,
LIBINPUT_DEVICE_CAP_TOUCH))
printf("t");
if (libinput_device_get_size(dev, &w, &h) == 0)
printf("\tsize %.2f/%.2fmm", w, h);