[PATCH xinput] Print the sourceid for raw events

Peter Hutterer peter.hutterer at who-t.net
Mon Apr 9 16:37:07 PDT 2012


Due to http://bugs.freedesktop.org/show_bug.cgi?id=34240 this will display 0
for XI < 2.2 and libXi < 1.6.1.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/test_xi2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/test_xi2.c b/src/test_xi2.c
index 7fd6f85..bcb4880 100644
--- a/src/test_xi2.c
+++ b/src/test_xi2.c
@@ -147,7 +147,7 @@ static void print_rawevent(XIRawEvent *event)
     int i;
     double *val, *raw_val;
 
-    printf("    device: %d\n", event->deviceid);
+    printf("    device: %d (%d)\n", event->deviceid, event->sourceid);
     printf("    detail: %d\n", event->detail);
     printf("    valuators:\n");
 #if HAVE_XI21
-- 
1.7.7.6


More information about the xorg-devel mailing list