summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-05-02 13:51:00 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-05-02 13:51:00 +1000
commit795657a0a12e4af43a5d2042b96fd8f932fed227 (patch)
treea51ead106c38103f3008be922660c478b5c90a25 /tools
parent4277d63bc672872baa4feda3af1ee3714b69d6e6 (diff)
tools: print the number of touches for touch devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/libinput-debug-events.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/libinput-debug-events.c b/tools/libinput-debug-events.c
index 32782c21..9bf9d52f 100644
--- a/tools/libinput-debug-events.c
+++ b/tools/libinput-debug-events.c
@@ -274,6 +274,10 @@ print_device_notify(struct libinput_event *ev)
if (libinput_device_get_size(dev, &w, &h) == 0)
printq(" size %.0fx%.0fmm", w, h);
+ if (libinput_device_has_capability(dev,
+ LIBINPUT_DEVICE_CAP_TOUCH))
+ printq(" ntouches %d", libinput_device_touch_get_touch_count(dev));
+
if (libinput_event_get_type(ev) == LIBINPUT_EVENT_DEVICE_ADDED)
print_device_options(dev);