aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quick/handlers/qquickpinchhandler.cpp6
-rw-r--r--src/quick/items/qquickwindow.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp
index 4db96d8a99..155822197f 100644
--- a/src/quick/handlers/qquickpinchhandler.cpp
+++ b/src/quick/handlers/qquickpinchhandler.cpp
@@ -248,8 +248,8 @@ bool QQuickPinchHandler::wantsPointerEvent(QQuickPointerEvent *event)
if (!QQuickMultiPointHandler::wantsPointerEvent(event))
return false;
- if (minimumPointCount() == 2) {
- if (const auto gesture = event->asPointerNativeGestureEvent()) {
+ if (const auto gesture = event->asPointerNativeGestureEvent()) {
+ if (minimumPointCount() == 2) {
switch (gesture->type()) {
case Qt::BeginNativeGesture:
case Qt::EndNativeGesture:
@@ -259,6 +259,8 @@ bool QQuickPinchHandler::wantsPointerEvent(QQuickPointerEvent *event)
default:
return false;
}
+ } else {
+ return false;
}
}
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 2dc3caf430..530d165850 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1938,7 +1938,8 @@ bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGes
{
QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
- if ((itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) && !item->contains(event->localPos()))
+ QPointF p = item->mapFromScene(event->windowPos());
+ if ((itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) && !item->contains(p))
return false;
QList<QQuickItem *> children = itemPrivate->paintOrderChildItems();
@@ -1961,7 +1962,6 @@ bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGes
}
// If still not accepted, try direct delivery to the item
- QPointF p = item->mapFromScene(event->localPos());
if (item->contains(p)) {
QNativeGestureEvent copy(event->gestureType(), event->device(), p, event->windowPos(), event->screenPos(),
event->value(), 0L, 0L); // TODO can't copy things I can't access