Running e.g. `xsetwacom get stylus TabletPCButton` would display
the wrong value to the user because the property is inverted.
This checks to see if PROP_FLAG_INVERTED is set, and to swap the
result if so.
---
tools/xsetwacom.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 365bad4..1258a50 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -2230,7 +2230,10 @@ static void get_param(Display *dpy, XDevice *dev,
param_t *param, int argc, char
int val = data[param->prop_offset + i];
if (param->prop_flags & PROP_FLAG_BOOLEAN)
- sprintf(&str[strlen(str)], "%s", val ?
"on" : "off");
+ if (param->prop_flags &
PROP_FLAG_INVERTED)
+ sprintf(&str[strlen(str)],
"%s", val ? "off" : "on");
+ else
+ sprintf(&str[strlen(str)],
"%s", val ? "on" : "off");
else
sprintf(&str[strlen(str)], "%d", val);
--
1.7.5.2
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel