From: Peter Hutterer Date: Fri, 26 Sep 2008 04:21:36 +0000 (+0930) Subject: Use updated property events. X-Git-Url: https://diplodocus.org/git/xorg-xinput/commitdiff_plain/db4b03629f690d69320f401b9568d5a861b19f9c?ds=inline;hp=--cc Use updated property events. No more QueryDeviceProperty request. --- db4b03629f690d69320f401b9568d5a861b19f9c diff --git a/src/property.c b/src/property.c index 0e62035..d739d6a 100644 --- a/src/property.c +++ b/src/property.c @@ -37,7 +37,6 @@ static void print_property(Display *dpy, XDevice* dev, Atom property) { - XIPropertyInfo *propinfo; Atom act_type; char *name; int act_format; @@ -45,14 +44,10 @@ print_property(Display *dpy, XDevice* dev, Atom property) unsigned char *data, *ptr; int j; - propinfo = XQueryDeviceProperty(dpy, dev, property); - if (!propinfo) - return; - name = XGetAtomName(dpy, property); printf("\t%s (%d):\t", name, property); - if (XGetDeviceProperty(dpy, dev, property, 0, 1000, False, False, + if (XGetDeviceProperty(dpy, dev, property, 0, 1000, False, AnyPropertyType, &act_type, &act_format, &nitems, &bytes_after, &data) == Success) { @@ -101,26 +96,6 @@ print_property(Display *dpy, XDevice* dev, Atom property) } else printf("\tFetch failure\n"); - if (propinfo->pending || propinfo->range || propinfo->immutable || propinfo->fromClient) - { - printf("\t\t%s%s%s%s", ((propinfo->pending) ? "[pending]" : ""), - ((propinfo->range) ? "[range]" : ""), - ((propinfo->immutable) ? "[immutable]" : ""), - ((propinfo->fromClient) ? "[client]" : "")); - printf("\n"); - } - - if (propinfo->num_values) - { - long *values = propinfo->values; - printf("\t\tvalid values: "); - while(values && propinfo->num_values--) - printf("%ld ", *values++); - printf("\n"); - } - - XFree(propinfo); - } int list_props(Display *dpy, int argc, char** argv, char* name, char *desc)