mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
tools: skip non-existing properties
If a property doesn't exist on a device, skip it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
@@ -446,6 +446,13 @@ dp_set_variables(Display *dpy, XDevice* dev, int argc, char *argv[], int first_c
|
||||
XGetDeviceProperty(dpy, dev, prop, 0, 1000, False, AnyPropertyType,
|
||||
&type, &format, &nitems, &bytes_after, &data);
|
||||
|
||||
if (type == None)
|
||||
{
|
||||
fprintf(stderr, "Property for '%s' not available. Skipping.\n",
|
||||
par->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(par->prop_format)
|
||||
{
|
||||
case 8:
|
||||
@@ -517,6 +524,8 @@ dp_show_settings(Display *dpy, XDevice *dev)
|
||||
XGetDeviceProperty(dpy, dev, a, 0, len, False,
|
||||
AnyPropertyType, &type, &format,
|
||||
&nitems, &bytes_after, &data);
|
||||
if (type == None)
|
||||
continue;
|
||||
|
||||
switch(par->prop_format) {
|
||||
case 8:
|
||||
|
||||
Reference in New Issue
Block a user