diff options
author | Jan Arve Saether <jan-arve.saether@qt.io> | 2017-06-22 10:12:56 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-01-31 08:26:32 +0000 |
commit | 6a7c662bd5f7fe4a223aba2e15bb24a9ffc92df6 (patch) | |
tree | e50095e8b210bdcee0c3a35b31fc11faf1a4574f /src | |
parent | e447285925623c40f5ddce65fa20e16333c75de0 (diff) |
Do not stop delivering to handlers if all points are accepted
Some Pointer Handlers can perform the desired interaction using only
passive grabs. When such a handler is used to modify behavior of
another event-handling Item or Handler which needs to take the
exclusive grab, this allows them to cooperate: both can see the
updates, and neither prevents delivery of events to both.
Change-Id: I312cc301c52fcdf805245bbe0ac60fd28f92c01f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 2d0f1218bf..8582dd8d2c 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtQuick module of the Qt Toolkit. @@ -2422,8 +2422,6 @@ void QQuickWindowPrivate::deliverUpdatedTouchPoints(QQuickPointerTouchEvent *eve done = true; event->localize(receiver); handler->handlePointerEvent(event); - if (event->allPointsAccepted()) - done = true; } if (done) break; @@ -2524,8 +2522,6 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QQuickPo } if (handlersOnly) return; - if (pointerEvent->allPointsAccepted() && !pointerEvent->isReleaseEvent()) - return; // If all points are released and the item is not the grabber, it doesn't get the event. // But if at least one point is still pressed, we might be in a potential gesture-takeover scenario. @@ -2537,8 +2533,6 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QQuickPo auto event = pointerEvent->asPointerMouseEvent(); if (event && item->acceptedMouseButtons() & event->button()) { auto point = event->point(0); - if (point->isAccepted()) - return; // The only reason to already have a mouse grabber here is // synthetic events - flickable sends one when setPressDelay is used. auto oldMouseGrabber = q->mouseGrabberItem(); |