diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-02-01 17:29:43 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-02-05 19:25:15 +0000 |
commit | 78c1fcbc49f56463064eef738a475d9018357b24 (patch) | |
tree | 246861b56307b03b43c461b75216f863a72e0b0d /src/quick | |
parent | 5de48ee56a5afb0045d40851a4a1dd79db82c772 (diff) |
QQuickWindow: don't give exclusive grab to invisible or disabled Items
An Item might set itself invisible or disabled while handling a mouse
press, as an alternative to rejecting the event. In earlier Qt versions
(e.g. 5.6) it did not end up with a grab in such a case.
Task-number: QTBUG-63271
Change-Id: I12f646e4217d773d396f380672420c85e6adcd52
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index dd5960e925..61c8bcc1e7 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2623,7 +2623,7 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QQuickPo auto mouseGrabber = q->mouseGrabberItem(); if (mouseGrabber && mouseGrabber != item && mouseGrabber != oldMouseGrabber) { item->mouseUngrabEvent(); - } else { + } else if (item->isEnabled() && item->isVisible()) { item->grabMouse(); } point->setAccepted(true); |