Eventaully I got a chance to test and fix the Intuos4 Pad ring scrolling issue. This same issue happens to Intuos3 strips too.
Reported-by: E. Holzminister <[email protected]> Signed-off-by: Ping Cheng <[email protected]> --- src/wcmCommon.c | 35 +++++++++++++++++++++++++++++------ src/xf86WacomDefs.h | 3 +++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index 0e9ad6a..d9d093f 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -387,8 +387,16 @@ static int getWheelButton(InputInfoPtr pInfo, const WacomDeviceState* ds, if ( (ds->abswheel != priv->oldWheel) && IsPad(priv) ) { value = priv->oldWheel - ds->abswheel; - fakeButton = (value > 0) ? priv->wheelup : priv->wheeldn; - *fakeKey = (value > 0) ? priv->wheel_keys[2] : priv->wheel_keys[3]; + + /* don't turn direction on the first value change in case it was + * an user touch error + */ + if (value * priv->oldWheelChange > 0) + { + fakeButton = (value > 0) ? priv->wheelup : priv->wheeldn; + *fakeKey = (value > 0) ? priv->wheel_keys[2] : priv->wheel_keys[3]; + } + priv->oldWheelChange = value; } /* emulate events for left strip */ @@ -407,8 +415,15 @@ static int getWheelButton(InputInfoPtr pInfo, const WacomDeviceState* ds, value -= temp; - fakeButton = (value > 0) ? priv->striplup : priv->stripldn; - *fakeKey = (value > 0) ? priv->strip_keys[0] : priv->strip_keys[1]; + /* don't turn direction on the first value change in case it was + * an user touch error + */ + if (value * priv->oldStripXChange > 0) + { + fakeButton = (value > 0) ? priv->striplup : priv->stripldn; + *fakeKey = (value > 0) ? priv->strip_keys[0] : priv->strip_keys[1]; + } + priv->oldStripXChange = value; } /* emulate events for right strip */ @@ -426,8 +441,16 @@ static int getWheelButton(InputInfoPtr pInfo, const WacomDeviceState* ds, } value -= temp; - fakeButton = (value > 0) ? priv->striprup : priv->striprdn; - *fakeKey = (value > 0) ? priv->strip_keys[2] : priv->strip_keys[2]; + + /* don't turn direction on the first value change in case it was + * an user touch error + */ + if (value * priv->oldStripYChange > 0) + { + fakeButton = (value > 0) ? priv->striprup : priv->striprdn; + *fakeKey = (value > 0) ? priv->strip_keys[2] : priv->strip_keys[2]; + } + priv->oldStripYChange = value; } DBG(10, priv, "send fakeButton %x with value = %d \n", diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h index 8cdc9e2..f6e26ca 100644 --- a/src/xf86WacomDefs.h +++ b/src/xf86WacomDefs.h @@ -240,6 +240,9 @@ struct _WacomDeviceRec int hardProx; /* previous hardware proximity */ int old_device_id; /* last in prox device id */ int old_serial; /* last in prox tool serial number */ + int oldWheelChange; /* last absolute pad wheel changed */ + int oldStripXChange; /* last pad left strip changed */ + int oldStripYChange; /* last pad right strip changed */ int devReverseCount; /* Relative ReverseConvert called twice each movement*/ int numScreen; /* number of configured screens */ int currentScreen; /* current screen in display */ -- 1.7.2.3 ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
