aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel d'Andrada <daniel.dandrada@canonical.com>2012-12-18 10:51:21 -0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-09 18:42:42 +0100
commit27be7a832f017653ffda705407bb7a64246eda1f (patch)
treebefd0a8b7ee5e2f4f95ba8e6fa5c11e824d9fb3e /src
parent4baed7ba620efdefa5eec503038e9be5f88f08b6 (diff)
Flickable: Fix bug when flicking twice using touches
When you flick twice in rapid succession, in the same direction, the expected behavior is for flickable to be moving quite fast in the direction of the flicks. But when you flicked using touch events instead of mouse ones, the second flick caused Flickable to immediately halt. This change fixes it. Change-Id: I02bd02fed30bd4a98959194e04f0a26b4420cd05 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickflickable.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 6e5e6b74a0..88ef20f3e5 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -2038,6 +2038,11 @@ bool QQuickFlickable::sendMouseEvent(QQuickItem *item, QMouseEvent *event)
QQuickWindow *c = window();
QQuickItem *grabber = c ? c->mouseGrabberItem() : 0;
+ if (grabber == this && d->stealMouse) {
+ // we are already the grabber and we do want the mouse event to ourselves.
+ return true;
+ }
+
bool grabberDisabled = grabber && !grabber->isEnabled();
bool stealThisEvent = d->stealMouse;
if ((stealThisEvent || contains(localPos)) && (!grabber || !grabber->keepMouseGrab() || grabberDisabled)) {