Actions specify X11 button numbers that should be generated when performed. The maximum button number that could be used in an event has been raised from the driver-imposed limit (WCM_MAX_BUTTON) to the server-imposed limit (WCM_MAX_X11BUTTON).
This feature is necessary for gnome-settings-daemon to work properly. To reliably identify each touch strip and ring, g-s-d assigns each a high button numbers to send for each direction. Without this patch, the driver ignores the actions set by g-s-d and continues to send whatever the default action is instead. Signed-off-by: Jason Gerecke <killert...@gmail.com> --- src/wcmXCommand.c | 4 ++-- src/xf86WacomDefs.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c index a2723f5..091697d 100644 --- a/src/wcmXCommand.c +++ b/src/wcmXCommand.c @@ -406,8 +406,8 @@ static int wcmCheckActionProperty(WacomDevicePtr priv, Atom property, XIProperty case AC_KEY: break; case AC_BUTTON: - if (code > WCM_MAX_BUTTONS) { - DBG(3, priv, "ERROR: AC_BUTTON code too high (%d > %d)\n", code, WCM_MAX_BUTTONS); + if (code > WCM_MAX_X11BUTTON) { + DBG(3, priv, "ERROR: AC_BUTTON code too high (%d > %d)\n", code, WCM_MAX_X11BUTTON); return BadValue; } break; diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h index abfde70..4157d78 100644 --- a/src/xf86WacomDefs.h +++ b/src/xf86WacomDefs.h @@ -193,6 +193,7 @@ struct _WacomModel #define DEFAULT_THRESHOLD (FILTER_PRESSURE_RES / 75) #define WCM_MAX_BUTTONS 32 /* maximum number of tablet buttons */ +#define WCM_MAX_X11BUTTON 127 /* maximum button number X11 can handle */ #define AXIS_INVERT 0x01 /* Flag describing an axis which increases "downward" */ #define AXIS_BITWISE 0x02 /* Flag describing an axis which changes bitwise */ -- 1.8.1.1 ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel