Direct-touch devices (e.g. tablet PC, 24HD touch) are currently left in GESTURE_NONE_MODE while performing drags. This can lead to potential "stuck button" issues, since as soon as a second finger comes in contact, the driver will switch to GESTURE_LAG_MODE. This prevents the wcmSingleFingerPress function from being called, leaving button 1 in a pressed state. While any subsuquent gesture will release button 1, if the pen is brought into proximity before one occurs, the fingers will be sent out of proximity without a chance to release button 1. This causes the button to remain "stuck" in the pressed state until the next touch occurs.
There are a few different ways this issue could be addressed. In the interest of symmetry with indirect-touch devices, this patch has direct-touch devices enter and exit GESTURE_DRAG_MODE as well. This delays the mode swith to GESTURE_LAG_MODE by one event, allowing wcmSingleFingerPress to be called to release button 1. https://bugs.freedesktop.org/show_bug.cgi?id=56308 Signed-off-by: Jason Gerecke <killert...@gmail.com> --- src/wcmTouchFilter.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c index 49658ea..5e0d349 100644 --- a/src/wcmTouchFilter.c +++ b/src/wcmTouchFilter.c @@ -357,10 +357,14 @@ static void wcmSingleFingerPress(WacomDevicePtr priv) if (!TabletHasFeature(priv->common, WCM_LCD)) return; - if (firstInProx && !secondInProx) + if (firstInProx && !secondInProx) { firstChannel->valid.states[0].buttons |= 1; - if (!firstInProx && !secondInProx) + common->wcmGestureMode = GESTURE_DRAG_MODE; + } + else { firstChannel->valid.states[0].buttons &= ~1; + common->wcmGestureMode = GESTURE_NONE_MODE; + } } /* parsing gesture mode according to 2FGT data */ @@ -527,7 +531,8 @@ ret: } #endif - if (common->wcmGestureMode == GESTURE_NONE_MODE && touch_id == 0) + if ((common->wcmGestureMode == GESTURE_NONE_MODE || common->wcmGestureMode == GESTURE_DRAG_MODE) && + touch_id == 0) { wcmSingleFingerTap(priv); wcmSingleFingerPress(priv); -- 1.7.12.2 ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel