And reset the scroll ring to an invalid value when leaving proximity. 0 is a valid value for an absolute axis if the min for this axis is 0 too.
Signed-off-by: Peter Hutterer <[email protected]> --- src/wcmCommon.c | 2 +- src/xf86Wacom.c | 4 ++-- src/xf86WacomDefs.h | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 816b15d..0b89c0c 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -820,7 +820,7 @@ void wcmSendEvents(InputInfoPtr pInfo, const WacomDeviceState* ds) else { priv->oldButtons = 0; - priv->oldWheel = 0; + priv->oldWheel = MAX_PAD_RING + 1; priv->oldX = 0; priv->oldY = 0; priv->oldZ = 0; diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c index bf5c1ec..d71020d 100644 --- a/src/xf86Wacom.c +++ b/src/xf86Wacom.c @@ -521,8 +521,8 @@ wcmInitAxes(DeviceIntPtr pWcm) { /* Touch ring */ label = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_WHEEL); - min = 0; - max = 71; + min = MIN_PAD_RING; + max = MAX_PAD_RING; min_res = max_res = res = 1; mode = Absolute; } diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h index 87d75d5..e873268 100644 --- a/src/xf86WacomDefs.h +++ b/src/xf86WacomDefs.h @@ -41,6 +41,9 @@ #define MAX_ROTATION_RANGE 1800 /* the maximum range of the marker pen rotation */ #define MAX_ABS_WHEEL 1023 /* the maximum value of absolute wheel */ +#define MIN_PAD_RING 0 /* I4 absolute scroll ring min value */ +#define MAX_PAD_RING 71 /* I4 absolute scroll ring max value */ + /* Default max distance to the tablet at which a proximity-out event is generated for * cursor device (e.g. mouse). */ -- 1.7.3.4 ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
