aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quick/items/qquickwindow.cpp2
-rw-r--r--tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp2
-rw-r--r--tests/manual/pointer/map.qml20
3 files changed, 13 insertions, 11 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 22425a96a6..39aebf7992 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2519,6 +2519,8 @@ bool QQuickWindowPrivate::deliverPressOrReleaseEvent(QQuickPointerEvent *event,
}
for (int i = 0; i < pointCount; ++i) {
auto point = event->point(i);
+ if (point->state() == QQuickEventPoint::Pressed && !event->isDoubleClickEvent())
+ point->clearPassiveGrabbers();
point->setAccepted(false); // because otherwise touchEventForItem will ignore it
if (point->grabberPointerHandler() && point->state() == QQuickEventPoint::Released)
point->setGrabberPointerHandler(nullptr, true);
diff --git a/tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp b/tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp
index 11a67cea82..2e48330758 100644
--- a/tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp
+++ b/tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp
@@ -231,7 +231,7 @@ void tst_FlickableInterop::mouseClickButton()
// We can drag <= dragThreshold and the button still acts normal, Flickable doesn't grab
p1 = button->mapToScene(QPointF(20, 20)).toPoint();
- QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, p1);
+ QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, p1, qApp->styleHints()->mouseDoubleClickInterval() + 10);
QTRY_VERIFY(button->property("pressed").toBool());
p1 += QPoint(dragThreshold, 0);
QTest::mouseMove(window, p1);
diff --git a/tests/manual/pointer/map.qml b/tests/manual/pointer/map.qml
index 3ed732b523..d5de9eaa39 100644
--- a/tests/manual/pointer/map.qml
+++ b/tests/manual/pointer/map.qml
@@ -56,16 +56,6 @@ Item {
}
}
- PinchHandler {
- id: pinch
- objectName: "two-point pinch"
- target: map
- minimumScale: 0.1
- maximumScale: 10
- onActiveChanged: if (!active) reRenderIfNecessary()
- grabPermissions: PinchHandler.TakeOverForbidden // don't allow takeover if pinch has started
- }
-
DragHandler {
objectName: "single-point drag"
target: map
@@ -81,6 +71,16 @@ Item {
onTranslationChanged: tilt.angle = translation.y / -2
}
+ PinchHandler {
+ id: pinch
+ objectName: "two-point pinch"
+ target: map
+ minimumScale: 0.1
+ maximumScale: 10
+ onActiveChanged: if (!active) reRenderIfNecessary()
+ grabPermissions: PinchHandler.TakeOverForbidden // don't allow takeover if pinch has started
+ }
+
function reRenderIfNecessary() {
var newSourceWidth = image.sourceSize.width * pinch.scale
var ratio = newSourceWidth / image.sourceSize.width