summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2016-01-19 08:55:36 -0800
committerJason Gerecke <killertofu@gmail.com>2016-01-25 10:59:21 -0800
commitbccfc6faa243909538bf18af04e1308c3b9c208f (patch)
treee643f8dce946febfd8b15770e4807d9306207b39
parente1df2c330db940c96030dafcab850fc167531113 (diff)
downloadxf86-input-wacom-bccfc6faa243909538bf18af04e1308c3b9c208f.tar.gz
xsetwacom: Only print action name for "modetoggle" and "displaytoggle"
Running "xsetwacom get" on a button which contain a "modetoggle" or "displaytoggle" action will result in output which cannot be parsed by "xsetwacom set". Both of these actions are treated like buttons, printing extra data that is not expected by the "set" command. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tools/xsetwacom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 95f7a6c..cf43fe7 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -2022,7 +2022,7 @@ static int get_actions(Display *dpy, XDevice *dev,
if (current_type == AC_KEY)
sprintf(str, "%c%s ", press_str,
XKeysymToString(detail));
- else
+ else if (current_type == AC_BUTTON)
sprintf(str, "%c%d ", press_str, detail);
strcat(buff, str);
last_type = current_type;