diff options
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/handlers/qquickdraghandler.cpp | 13 | ||||
-rw-r--r-- | src/quick/handlers/qquickdraghandler_p.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp index e5e9b03f32..980481303f 100644 --- a/src/quick/handlers/qquickdraghandler.cpp +++ b/src/quick/handlers/qquickdraghandler.cpp @@ -179,6 +179,19 @@ void QQuickDragHandler::onActiveChanged() } } +bool QQuickDragHandler::wantsPointerEvent(QPointerEvent *event) +{ + if (!QQuickMultiPointHandler::wantsPointerEvent(event)) + return false; + +#if QT_CONFIG(gestures) + if (event->type() == QEvent::NativeGesture) + return false; +#endif + + return true; +} + void QQuickDragHandler::handlePointerEventImpl(QPointerEvent *event) { QQuickMultiPointHandler::handlePointerEventImpl(event); diff --git a/src/quick/handlers/qquickdraghandler_p.h b/src/quick/handlers/qquickdraghandler_p.h index c1ff108e13..dfd0961b49 100644 --- a/src/quick/handlers/qquickdraghandler_p.h +++ b/src/quick/handlers/qquickdraghandler_p.h @@ -94,6 +94,7 @@ Q_SIGNALS: Q_REVISION(2, 14) void snapModeChanged(); protected: + bool wantsPointerEvent(QPointerEvent *event) override; void onActiveChanged() override; void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, QPointerEvent *event, QEventPoint &point) override; |