[PATCH libinput 2/6] tools: print the device name on DEVICE_ADDED

Peter Hutterer peter.hutterer at who-t.net
Tue Nov 18 23:26:43 PST 2014


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 tools/event-debug.c | 3 ++-
 tools/event-gui.c   | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/event-debug.c b/tools/event-debug.c
index 00882bf..1d9c8a0 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -259,7 +259,8 @@ print_device_notify(struct libinput_event *ev)
 	double w, h;
 	uint32_t scroll_modes;
 
-	printf("%s	%s",
+	printf("%-30s	%s	%s",
+	       libinput_device_get_name(dev),
 	       libinput_seat_get_physical_name(seat),
 	       libinput_seat_get_logical_name(seat));
 
diff --git a/tools/event-gui.c b/tools/event-gui.c
index 142990d..b6d21b6 100644
--- a/tools/event-gui.c
+++ b/tools/event-gui.c
@@ -272,7 +272,10 @@ handle_event_device_notify(struct libinput_event *ev)
 	else
 		type = "removed";
 
-	msg("%s %s\n", libinput_device_get_sysname(dev), type);
+	msg("%s %-30s %s\n",
+	    libinput_device_get_sysname(dev),
+	    libinput_device_get_name(dev),
+	    type);
 
 	if (libinput_device_config_tap_get_finger_count(dev) > 0) {
 		enum libinput_config_status status;
-- 
2.1.0



More information about the wayland-devel mailing list