summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den.exter@qinetic.com.au>2016-03-10 13:28:06 +1000
committerAndrew den Exter <andrew.den.exter@qinetic.com.au>2016-09-23 00:31:58 +0000
commit0aea009425242417bffdb171c8eca02ff52f4a7b (patch)
treea8c22df67944ee830c7a7d351748d5e8013a0c7a /src
parent345226aa3ecee8642c3bf46e40c981d4a49d958e (diff)
Fix Flickable state being reset when it replays a delayed press.
Ignore mouseUngrabEvents() triggered by giving mouse grab to a child item when replaying a delayed press event. Change-Id: I6c8db61167e21bf10d533b17f7cc65e4754bd432 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickflickable.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 870a0268e1..c838eae3c7 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -1539,11 +1539,11 @@ void QQuickFlickablePrivate::replayDelayedPress()
// If we have the grab, release before delivering the event
if (QQuickWindow *w = q->window()) {
+ replayingPressEvent = true;
if (w->mouseGrabberItem() == q)
q->ungrabMouse();
// Use the event handler that will take care of finding the proper item to propagate the event
- replayingPressEvent = true;
QCoreApplication::sendEvent(w, mouseEvent.data());
replayingPressEvent = false;
}
@@ -2199,7 +2199,8 @@ void QQuickFlickable::mouseUngrabEvent()
Q_D(QQuickFlickable);
// if our mouse grab has been removed (probably by another Flickable),
// fix our state
- d->cancelInteraction();
+ if (!d->replayingPressEvent)
+ d->cancelInteraction();
}
void QQuickFlickablePrivate::cancelInteraction()