No functional change, making the code more readable.
Signed-off-by: Peter Hutterer <[email protected]>
---
tools/xsetwacom.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index e606541..3b423f9 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -1125,6 +1125,7 @@ static void special_map_property(Display *dpy, XDevice
*dev, Atom btnact_prop, i
int i;
int nwords = 0;
char **words = NULL;
+ int unset_prop = 0;
XGetDeviceProperty(dpy, dev, btnact_prop, 0, 100, False,
AnyPropertyType, &type, &format, &btnact_nitems,
@@ -1151,6 +1152,7 @@ static void special_map_property(Display *dpy, XDevice
*dev, Atom btnact_prop, i
{
prop = btnact_data[offset];
btnact_data[offset] = 0;
+ unset_prop = 1;
} else if (btnact_data[offset])
/* some atom already assigned, modify that */
prop = btnact_data[offset];
@@ -1195,7 +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 (argc > 0) /* unset property */
+ 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel