]> diplodocus.org Git - xorg-xinput/blobdiff - src/property.c
Require inputproto 1.9.99.12
[xorg-xinput] / src / property.c
index 49ba4f03f27b1fd480e6feaa18d01e210107d692..59a8aa37be2687a807171579ce62c584291190ed 100644 (file)
@@ -72,6 +72,9 @@ print_property(Display *dpy, XDevice* dev, Atom property)
 
         ptr = data;
 
+        if (nitems == 0)
+            printf("<no items>");
+
         switch(act_format)
         {
             case 8: size = sizeof(char); break;
@@ -617,6 +620,9 @@ print_property_xi2(Display *dpy, int deviceid, Atom property)
 
         ptr = data;
 
+        if (nitems == 0)
+            printf("<no items>");
+
         for (j = 0; j < nitems; j++)
         {
             switch(act_type)
@@ -649,7 +655,13 @@ print_property_xi2(Display *dpy, int deviceid, Atom property)
                                                   the terminating 0 */
                     break;
                 case XA_ATOM:
-                    printf("\"%s\"", XGetAtomName(dpy, *(Atom*)ptr));
+                    {
+                        Atom a = *(Atom*)ptr;
+                        printf("\"%s\" (%d)",
+                                (a) ? XGetAtomName(dpy, a) : "None",
+                                (int)a);
+                        break;
+                    }
                     break;
                 default:
                     if (float_atom != None && act_type == float_atom)