At the moment, disabling gestures disables *all* gestures. That includes the core "tap to click" gesture (and slightly-less-core "tap and hold to drag"). This patch changes the behavior of the driver to always allow single finger gestures, even if gestures have been disabled. This makes using the tablet a bit more user friendly when gestures have been disabled to allow multitouch to be handled outside of the driver. --- This patch has been marked RFC since I'm not sure if this is how we want the driver to act or not. Having touch enabled without "tap to click" is pretty useless IMHO, but I don't want to push this without getting an idea of possible ways it could backfire.
man/wacom.man | 6 +++--- src/wcmTouchFilter.c | 17 +++++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/man/wacom.man b/man/wacom.man index 4438cc5..c14a3d6 100644 --- a/man/wacom.man +++ b/man/wacom.man @@ -232,9 +232,9 @@ The threshold applies to the normalised pressure range of [0..2048]. The default is 27. .TP 4 .B Option \fI"Gesture"\fP \fI"bool"\fP -Enable or disable in-driver gesture support on the device. Default: off unless the -tablet supports multi-touch. Note that disabling this option may allow the desktop -environment to detect gestures instead. +Enable or disable multi-finger in-driver gesture support on the device. Default: off +unless the tablet supports multi-touch. Note that disabling this option may allow +the desktop environment to detect multi-finger gestures instead. .TP 4 .B Option \fI"ZoomDistance"\fP \fI"number"\fP If diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c index b859973..49658ea 100644 --- a/src/wcmTouchFilter.c +++ b/src/wcmTouchFilter.c @@ -250,6 +250,9 @@ static void wcmFingerTapToClick(WacomDevicePtr priv) WacomCommonPtr common = priv->common; WacomDeviceState ds[2] = {{0}}, dsLast[2] = {{0}}; + if (!common->wcmGesture) + return; + getStateHistory(common, ds, ARRAY_SIZE(ds), 0); getStateHistory(common, dsLast, ARRAY_SIZE(dsLast), 1); @@ -379,7 +382,7 @@ void wcmGestureFilter(WacomDevicePtr priv, int touch_id) return; } - if (!common->wcmGesture) + if (common->wcmGestureMode == GESTURE_MULTITOUCH_MODE) goto ret; /* When 2 fingers are in proximity, it must always be in one of @@ -526,11 +529,7 @@ ret: if (common->wcmGestureMode == GESTURE_NONE_MODE && touch_id == 0) { - /* Since this is in ret block, can not rely on generic - * wcmGesture enable check from above. - */ - if (common->wcmGesture) - wcmSingleFingerTap(priv); + wcmSingleFingerTap(priv); wcmSingleFingerPress(priv); } } @@ -575,6 +574,9 @@ static void wcmFingerScroll(WacomDevicePtr priv) WacomFilterState filterd; /* borrow this struct */ int max_spread = common->wcmGestureParameters.wcmMaxScrollFingerSpread; + if (!common->wcmGesture) + return; + getStateHistory(common, ds, ARRAY_SIZE(ds), 0); DBG(10, priv, "\n"); @@ -672,6 +674,9 @@ static void wcmFingerZoom(WacomDevicePtr priv) common->wcmGestureState[1]); int max_spread = common->wcmGestureParameters.wcmMaxScrollFingerSpread; + if (!common->wcmGesture) + return; + getStateHistory(common, ds, ARRAY_SIZE(ds), 0); DBG(10, priv, "\n"); -- 1.7.12 ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel