xsetwacom set "device" Button 1 "Ctrl Z" cannot be parsed by xsetwacom, leading to a nonfunctioning button without the user realising why. Print an error and complain if the keyword is unknown/invalid.
Bug 3054502 https://sourceforge.net/tracker/?func=detail&atid=525124&aid=3054502&group_id=69596 Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- tools/xsetwacom.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c index fa98e3e..e606541 100644 --- a/tools/xsetwacom.c +++ b/tools/xsetwacom.c @@ -1172,6 +1172,8 @@ static void special_map_property(Display *dpy, XDevice *dev, Atom btnact_prop, i for (i = 0; i < nwords; i++) { int j = 0; + int keyword_found = 0; + while (keywords[j].keyword && i < nwords) { int parsed = 0; @@ -1181,12 +1183,16 @@ static void special_map_property(Display *dpy, XDevice *dev, Atom btnact_prop, i &words[i + 1], &nitems, data); i += parsed; + keyword_found = 1; } if (parsed) j = parsed = 0; /* restart with first keyword */ else j++; } + + if (!keyword_found) + fprintf(stderr, "Cannot parse keyword '%s'\n", words[i]); } if (argc > 0) /* unset property */ -- 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