summaryrefslogtreecommitdiff
path: root/src/wcmTouchFilter.c
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2012-10-23 10:20:17 -0700
committerJason Gerecke <killertofu@gmail.com>2012-10-26 14:39:32 -0700
commit97358d0effeb4b72af095cb67d12881286f6fb04 (patch)
tree87abb864017ac284645f3da449c8287b4167e957 /src/wcmTouchFilter.c
parent74396082c690800a04d20dab2c41e873836774aa (diff)
downloadxf86-input-wacom-97358d0effeb4b72af095cb67d12881286f6fb04.tar.gz
Have direct-touch devices move into and out of GESTURE_DRAG_MODE
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 <killertofu@gmail.com> Reviewed-by: Ping Cheng <pinglinux@gmail.com>
Diffstat (limited to 'src/wcmTouchFilter.c')
-rw-r--r--src/wcmTouchFilter.c11
1 files 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);