diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-23 10:24:31 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-11-23 22:16:18 +0000 |
commit | 390ac50d486e35910822402264e33fe74be07198 (patch) | |
tree | 94152db1e7b32393daff44cdee3276ec3691d6e6 /tests | |
parent | c958c93ac5e06986604a9a381b196d3dd2b6b73a (diff) |
Don't deliver to non-grabbing pointerhandlers if a point is grabbed
In particular, on press when QQuickFlickable::filterPointerEvent() calls
captureDelayedPress() and will return true, it also accepts the event to
stop propagation. It becomes the grabber as a consequence of that.
On a future move event, when the drag threshold is exceeded while the
delayed press timer is still running, Flickable already has the grab
(but it accepts the event again), and QQuickFlickablePrivate::drag()
calls setKeepMouseGrab(true). In this case we still want to prevent any
children's DragHandlers from seeing the event, because a DragHandler
will also see that the drag threshold was exceeded and try to steal the
grab. A DragHandler can steal the grab only if there was no press
delay: then it sees the initial press because Flickable does NOT stop
event propagation (does not accept the event), so it can take a passive
grab and continue to wait for the drag threshold to be exceeded,
regardless of what else happens.
In case of multiple touchpoints, allPointsGrabbed() returns false if the
Flickable has only grabbed one point; but we want to avoid delivering
handlers in children just on the basis of that grabbed touchpoint being
within their bounds, even though other points may be delivered to
various handlers.
This fixes tst_FlickableInterop::touchAndDragHandlerOnFlickable.
The blacklisting of dragHandlerInSiblingStealingGrabFromMouseAreaViaTouch
was bogus (it's in the mousearea_interop test).
Task-number: QTBUG-86729
Change-Id: I9f0d42e97de4f4a3b4f7773800a8d59dc34a0553
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c5c05498a7e79c1868551192921a42236ecbf5f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST index a992fbf137..47c11f14d8 100644 --- a/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST +++ b/tests/auto/quick/pointerhandlers/flickableinterop/BLACKLIST @@ -9,7 +9,3 @@ windows gcc macos # QTBUG-86729 [touchDragSliderAndFlickable] * # QTBUG-86729 -[touchAndDragHandlerOnFlickable] -* # QTBUG-86729 -[dragHandlerInSiblingStealingGrabFromMouseAreaViaTouch] -* # QTBUG-86729 |