From be3d1e0a4fc2c39ba87f4f065942bd3418fb351e Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 13 Oct 2009 14:54:39 +0200 Subject: Mac: small bugfix to the mac gesture implementation Make sure that we cancel the pan gesture if the user starts to press several fingers on the trackpad, and the gesture has not yet got a chance to start Rev-By: trustme --- src/gui/kernel/qmacgesturerecognizer_mac.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/kernel/qmacgesturerecognizer_mac.mm b/src/gui/kernel/qmacgesturerecognizer_mac.mm index 210d00b..7b19a54 100644 --- a/src/gui/kernel/qmacgesturerecognizer_mac.mm +++ b/src/gui/kernel/qmacgesturerecognizer_mac.mm @@ -223,6 +223,12 @@ QMacPanGestureRecognizer::filterEvent(QGesture *gesture, QObject *target, QEvent _lastPos = p; return QGestureRecognizer::GestureTriggered; } + } else if (_panTimer.isActive()) { + // I only want to cancel the pan if the user is pressing + // more than one finger, and the pan hasn't started yet: + _panCanceled = true; + _panTimer.stop(); + return QGestureRecognizer::NotGesture; } break;} case QEvent::Timer: { -- cgit v0.12