X-Git-Url: https://diplodocus.org/git/xorg-xinput/blobdiff_plain/9c6a51e8aaba50b8f3a0f3ad767c34a80aee55a1..82d338548e22ae271f50592e759794dd7536a207:/src/property.c diff --git a/src/property.c b/src/property.c index 2b402a9..59a8aa3 100644 --- a/src/property.c +++ b/src/property.c @@ -72,6 +72,9 @@ print_property(Display *dpy, XDevice* dev, Atom property) ptr = data; + if (nitems == 0) + printf(""); + switch(act_format) { case 8: size = sizeof(char); break; @@ -111,8 +114,13 @@ print_property(Display *dpy, XDevice* dev, Atom property) the terminating 0 */ break; case XA_ATOM: - printf("\"%s\"", XGetAtomName(dpy, *(Atom*)ptr)); - break; + { + Atom a = *(Atom*)ptr; + printf("\"%s\" (%d)", + (a) ? XGetAtomName(dpy, a) : "None", + (int)a); + break; + } default: if (float_atom != None && act_type == float_atom) { @@ -612,6 +620,9 @@ print_property_xi2(Display *dpy, int deviceid, Atom property) ptr = data; + if (nitems == 0) + printf(""); + for (j = 0; j < nitems; j++) { switch(act_type) @@ -644,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)