Signed-off-by: Peter Hutterer <[email protected]>
---
no functional changes, but at least it's readable now.
src/wcmTouchFilter.c | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c
index 4afede2..433e12f 100644
--- a/src/wcmTouchFilter.c
+++ b/src/wcmTouchFilter.c
@@ -290,18 +290,21 @@ void wcmGestureFilter(WacomDevicePtr priv, int channel)
wcmFingerScroll(priv);
/* process complex two finger gestures */
- else if ((2*common->wcmGestureParameters.wcmTapTime <
- (GetTimeInMillis() - ds[0].sample)) &&
- (2*common->wcmGestureParameters.wcmTapTime <
- (GetTimeInMillis() - ds[1].sample))
- && ds[0].proximity && ds[1].proximity)
- {
- /* scroll should be considered first since it requires
- * a finger distance check */
- wcmFingerScroll(priv);
+ else {
+ CARD32 ms = GetTimeInMillis();
+ int taptime = 2 * common->wcmGestureParameters.wcmTapTime;
+
+ if (ds[0].proximity && ds[1].proximity &&
+ (taptime < (ms - ds[0].sample)) &&
+ (taptime < (ms - ds[1].sample)))
+ {
+ /* scroll should be considered first since it requires
+ * a finger distance check */
+ wcmFingerScroll(priv);
- if (!(common->wcmGestureMode & GESTURE_SCROLL_MODE))
- wcmFingerZoom(priv);
+ if (!(common->wcmGestureMode & GESTURE_SCROLL_MODE))
+ wcmFingerZoom(priv);
+ }
}
ret:
if (!common->wcmGestureMode && !channel && !is_absolute(priv->pInfo))
--
1.7.6
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel