aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickdrawer.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-05 16:46:14 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-08 08:57:12 +0000
commit1dc60a6b0c6fbf8da9473eb5b0435c1738865ce5 (patch)
tree42a23afae7c42103302b110bd4055155d1d963e2 /src/quicktemplates2/qquickdrawer.cpp
parent932d5f78296e604c57c8ebcfe5c94f5ce62238f4 (diff)
Drawer: fix dragging from the inside over interactive contents
Task-number: QTBUG-60598 Change-Id: I65e6e9440c9450fbec4a53b9ee60e11b919c090a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickdrawer.cpp')
-rw-r--r--src/quicktemplates2/qquickdrawer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp
index 94b8aea7..1ea3a8ab 100644
--- a/src/quicktemplates2/qquickdrawer.cpp
+++ b/src/quicktemplates2/qquickdrawer.cpp
@@ -301,7 +301,7 @@ bool QQuickDrawerPrivate::grabMouse(QQuickItem *item, QMouseEvent *event)
Q_Q(QQuickDrawer);
handleMouseEvent(item, event);
- if (!window || !interactive || popupItem->keepMouseGrab())
+ if (!window || !interactive || popupItem->keepMouseGrab() || popupItem->keepTouchGrab())
return false;
const QPointF movePoint = event->windowPos();
@@ -377,6 +377,7 @@ bool QQuickDrawerPrivate::grabTouch(QQuickItem *item, QTouchEvent *event)
}
if (overThreshold) {
+ popupItem->grabTouchPoints(QVector<int>() << touchId);
popupItem->setKeepTouchGrab(true);
offset = offsetAt(movePoint);
}
@@ -422,7 +423,6 @@ bool QQuickDrawerPrivate::handleRelease(QQuickItem *item, const QPointF &point,
return QQuickPopupPrivate::handleRelease(item, point, timestamp);
}
- pressPoint = QPointF();
velocityCalculator.stopMeasuring(point, timestamp);
qreal velocity = 0;
@@ -479,6 +479,9 @@ bool QQuickDrawerPrivate::handleRelease(QQuickItem *item, const QPointF &point,
popupItem->setKeepMouseGrab(false);
popupItem->setKeepTouchGrab(false);
+ pressPoint = QPointF();
+ touchId = -1;
+
return wasGrabbed;
}