tools: print available click methods on device notify

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2015-03-18 10:01:03 +10:00
parent d101d43dd0
commit 7506d69811

View file

@ -124,7 +124,7 @@ print_device_notify(struct libinput_event *ev)
struct libinput_seat *seat = libinput_device_get_seat(dev);
struct libinput_device_group *group;
double w, h;
uint32_t scroll_methods;
uint32_t scroll_methods, click_methods;
static int next_group_id = 0;
intptr_t group_id;
@ -175,6 +175,15 @@ print_device_notify(struct libinput_event *ev)
printf("-button");
}
click_methods = libinput_device_config_click_get_methods(dev);
if (click_methods != LIBINPUT_CONFIG_CLICK_METHOD_NONE) {
printf(" click");
if (click_methods & LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS)
printf("-buttonareas");
if (click_methods & LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER)
printf("-clickfinger");
}
printf("\n");
}