If keyword parsing failed and we have zero items to update to (but we're not trying to reset the property), don't update the button action property.
Reproducer: xsetwacom set "device" Button 1 "blah" would print an error about invalid keywords but still update (erase) the button mapping property. Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- tools/xsetwacom.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c index afaa449..07d8e26 100644 --- a/tools/xsetwacom.c +++ b/tools/xsetwacom.c @@ -1197,8 +1197,7 @@ static void special_map_property(Display *dpy, XDevice *dev, Atom btnact_prop, i fprintf(stderr, "Cannot parse keyword '%s'\n", words[i]); } - /* if we don't have any data, don't update the property */ - if (unset_prop || nitems > 0) + if (unset_prop) XChangeDeviceProperty(dpy, dev, prop, XA_INTEGER, 32, PropModeReplace, (unsigned char*)data, nitems); -- 1.7.4 ------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel