From: Chris Bagwell <ch...@cnpbagwell.com>

Added check for wcmGesture for 1 finger gestures since it couldn't make
use of generic check.

Skip 1 finger tap on touchscreens based on LCD feature instead of
is_absolute() value.  Also, since this is gesture specific validation,
moved to inside function.

Signed-off-by: Chris Bagwell <ch...@cnpbagwell.com>
---
 src/wcmTouchFilter.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c
index 6ee1b59..91849f4 100644
--- a/src/wcmTouchFilter.c
+++ b/src/wcmTouchFilter.c
@@ -171,6 +171,10 @@ static void wcmSingleFingerTap(WacomDevicePtr priv)
 
        DBG(10, priv, "\n");
 
+       /* This gesture is only valid on touchpads. */
+       if (TabletHasFeature(priv->common, WCM_LCD))
+               return;
+
        if (!ds[0].proximity && dsLast[0].proximity && !ds[1].proximity)
        {
                /* Single Tap must have lasted less than wcmTapTime
@@ -329,9 +333,14 @@ void wcmGestureFilter(WacomDevicePtr priv, int channel)
                }
        }
 ret:
-       if (common->wcmGestureMode == GESTURE_NONE_MODE &&
-           !channel && !is_absolute(priv->pInfo))
-               wcmSingleFingerTap(priv);
+       if (common->wcmGestureMode == GESTURE_NONE_MODE && !channel)
+       {
+               /* Since this is in ret block, can not rely on generic
+                * wcmGesture enable check from above.
+                */
+               if (common->wcmGesture)
+                       wcmSingleFingerTap(priv);
+       }
 }
 
 static void wcmSendScrollEvent(WacomDevicePtr priv, int dist,
-- 
1.7.6


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to