From bae1598c2a0db724626c5a8e37a5874f2a46354a Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 25 Mar 2021 22:48:20 +0100 Subject: DragHandler: don't try to handle native gesture events No gesture handling has been implemented in DragHandler (although we could). It just made the target item jump unintentionally. QQuickMultiPointHandler::wantsPointerEvent() returns true for gestures, because PinchHandler handles them, and the pattern is that base classes only rule out some kinds of events but leave the final decision up to the leaf class. The autotest has to use a touchpad now, not the primary pointing device, because QQuickPointerDeviceHandler::wantsPointerEvent() returns false if pointerType != Finger and acceptedButtons() is not satisfied. Fixes: QTBUG-92165 Change-Id: I984de750c9ae892f3ee61c7ed5b3ac4a7d187024 Reviewed-by: Richard Moe Gustavsen (cherry picked from commit 73051631545dc59d4419a5ef2202355349aab480) Reviewed-by: Shawn Rutledge Reviewed-by: Fabian Kosmale --- src/quick/handlers/qquickdraghandler_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quick/handlers/qquickdraghandler_p.h') 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; -- cgit v1.2.3