mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-04-17 09:10:43 +02:00
tools: print the device group in event-debug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
parent
761baeb6e6
commit
f0d7eaf11e
1 changed files with 13 additions and 2 deletions
|
|
@ -122,13 +122,24 @@ print_device_notify(struct libinput_event *ev)
|
|||
{
|
||||
struct libinput_device *dev = libinput_event_get_device(ev);
|
||||
struct libinput_seat *seat = libinput_device_get_seat(dev);
|
||||
struct libinput_device_group *group;
|
||||
double w, h;
|
||||
uint32_t scroll_methods;
|
||||
static int next_group_id = 0;
|
||||
intptr_t group_id;
|
||||
|
||||
printf("%-33s %5s %7s",
|
||||
group = libinput_device_get_device_group(dev);
|
||||
group_id = (intptr_t)libinput_device_group_get_user_data(group);
|
||||
if (!group_id) {
|
||||
group_id = ++next_group_id;
|
||||
libinput_device_group_set_user_data(group, (void*)group_id);
|
||||
}
|
||||
|
||||
printf("%-33s %5s %7s group%d",
|
||||
libinput_device_get_name(dev),
|
||||
libinput_seat_get_physical_name(seat),
|
||||
libinput_seat_get_logical_name(seat));
|
||||
libinput_seat_get_logical_name(seat),
|
||||
(int)group_id);
|
||||
|
||||
printf(" cap:");
|
||||
if (libinput_device_has_capability(dev,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue