]> diplodocus.org Git - xorg-xinput/commitdiff
Use updated property events.
authorPeter Hutterer <peter.hutterer@redhat.com>
Fri, 26 Sep 2008 04:21:36 +0000 (13:51 +0930)
committerPeter Hutterer <peter.hutterer@redhat.com>
Fri, 26 Sep 2008 04:28:43 +0000 (13:58 +0930)
No more QueryDeviceProperty request.

src/property.c

index 0e620350268211225e96e324d414efc6734c359c..d739d6a79c7d8101416e94d0ca2cccfd16cd1789 100644 (file)
@@ -37,7 +37,6 @@
 static void
 print_property(Display *dpy, XDevice* dev, Atom property)
 {
 static void
 print_property(Display *dpy, XDevice* dev, Atom property)
 {
-    XIPropertyInfo      *propinfo;
     Atom                act_type;
     char                *name;
     int                 act_format;
     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;
 
     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);
 
     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)
     {
                            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");
 
     } 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)
 }
 
 int list_props(Display *dpy, int argc, char** argv, char* name, char *desc)