summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2013-01-17 16:51:22 -0800
committerJason Gerecke <killertofu@gmail.com>2013-01-23 11:07:08 -0800
commit7e418191a29f681331dd0134c8887d641d737410 (patch)
treedb0c9c7f1b9d4bcb5a88d430753c2306be0619d2
parent082f37feee3170521df4a1a1bbd91e0274282bf1 (diff)
Increase maximum allowed X11 button number
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 <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/wcmXCommand.c4
-rw-r--r--src/xf86WacomDefs.h1
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 29355f6..5b54de6 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 */