From: Jacob Nevins <0jacobnk....@chiark.greenend.org.uk> This was removed from the driver in 2010 (910dc637). Stop claiming to support it in xsetwacom(1), etc.
Fixes https://sourceforge.net/p/linuxwacom/bugs/236/ Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- include/Xwacom.h | 2 +- src/wcmXCommand.c | 1 - tools/xsetwacom.c | 18 ++++++++---------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/include/Xwacom.h b/include/Xwacom.h index 3ca8573..49489ff 100644 --- a/include/Xwacom.h +++ b/include/Xwacom.h @@ -59,7 +59,7 @@ #define AC_KEY 0x00010000 /* Emit key events */ #define AC_MODETOGGLE 0x00020000 /* Toggle absolute/relative mode */ #define AC_DBLCLICK 0x00030000 /* DEPRECATED: use two button events instead */ -#define AC_DISPLAYTOGGLE 0x00040000 /* Toggle among screens */ +#define AC_DISPLAYTOGGLE 0x00040000 /* DEPRECATED: has no effect (used to toggle among screens) */ #define AC_BUTTON 0x00080000 /* Emit button events */ #define AC_TYPE 0x000f0000 /* The mask to isolate event type bits */ #define AC_KEYBTNPRESS 0x00100000 /* bit set for key/button presses */ diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c index 0ec8737..19cb63b 100644 --- a/src/wcmXCommand.c +++ b/src/wcmXCommand.c @@ -431,7 +431,6 @@ static int wcmCheckActionProperty(WacomDevicePtr priv, Atom property, XIProperty return BadValue; } break; - case AC_DISPLAYTOGGLE: case AC_MODETOGGLE: break; default: diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c index 508326e..c4121df 100644 --- a/tools/xsetwacom.c +++ b/tools/xsetwacom.c @@ -985,16 +985,17 @@ static int special_map_modetoggle(Display *dpy, int argc, char **argv, unsigned return 0; } +/* the "displaytoggle" keyword isn't supported anymore, we just have this + here to tell people that. */ static int special_map_displaytoggle(Display *dpy, int argc, char **argv, unsigned long *ndata, unsigned long *data, const size_t size) { - if (*ndata + 1 > size) { - fprintf(stderr, "Insufficient space to store all commands.\n"); - return 0; + static int once_only = 1; + if (once_only) + { + printf ("Note: The \"displaytoggle\" keyword is not supported " + "anymore and will be ignored.\n"); + once_only = 0; } - data[*ndata] = AC_DISPLAYTOGGLE; - - *ndata += 1; - return 0; } @@ -1914,9 +1915,6 @@ static int get_actions(Display *dpy, XDevice *dev, case AC_MODETOGGLE: strcat(buff, "modetoggle "); break; - case AC_DISPLAYTOGGLE: - strcat(buff, "displaytoggle "); - break; default: TRACE("unknown type %d\n", current_type); continue; -- 1.8.5.3 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel