From 0bd86b0e2ee67c3f99b8a9712c743c25c8be39b8 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 18 Sep 2020 21:59:48 +0200 Subject: Handle ungrab and grab-cancel consistently; inform handlers Call onGrabChanged on Pointer Handlers during grab transitions: this was missing in a97759a336c597327cb82eebc9f45c793aec32c9. Flickable needs to receive an ungrab by child-event-filtering, in order to set its pressed state back to false (as in the cancelOnHide autotest). This is best done as a result of the QPointingDevice::grabChanged signal, while trying to send the ungrab to the item that was the grabber, rather than as a special case. Thus, QQuickWindowPrivate::onGrabChanged (the handler for the QPointingDevice::grabChanged signal) is now the only place from which we call QQuickItem::mouseUngrabEvent() and touchUngrabEvent(). But the result is that they are called in more cases than before, so some tests need adjustment. touchUngrabEvent() is not sent unless the event is available and we can verify that all points have been released. This is important for MultiPointTouchArea: it will react by ending interaction with all points at once. Another thing that's important to MPTA and multi-touch handlers is that QQuickWindowPrivate::deliverPointerEvent() must not clear grabbers of points that are not yet released, in the case that only some points are. QQuickWindowPrivate::removeGrabber() now calls QPointingDevicePrivate::removeGrabber() with its optional cancel argument, so that it will emit either a cancel or an ungrab transition. That's only relevant for Pointer Handlers, whereas QQuickItem mouseUngrabEvent and touchUngrabEvent don't make a distinction. Task-number: QTBUG-86729 Change-Id: Idf03aef2e2182398e0fc4a606c0ddbb2aaed5681 Reviewed-by: Volker Hilsheimer Reviewed-by: Fabian Kosmale --- tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST (limited to 'tests/auto/quick/pointerhandlers/qquickpinchhandler') diff --git a/tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST b/tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST deleted file mode 100644 index 9dfa00a2be..0000000000 --- a/tests/auto/quick/pointerhandlers/qquickpinchhandler/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[scaleThreeFingers] -* # QTBUG-86729 -- cgit v1.2.3