diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-10-29 18:44:18 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-10-31 18:00:19 +0100 |
commit | a20192e6c5008631e2bebb0e05cadfd2cf4cf62e (patch) | |
tree | 1db3d0a2ee0bd03bd708e64e33fc290b2b4dc137 | |
parent | 40d4e162d11a6920401e91b126f3d25c0b177926 (diff) |
Fix QQuickItem::ungrabMouse()
Amends a97759a336c597327cb82eebc9f45c793aec32c9
Change-Id: I43f03b699fe2b5e43c0bfe3e1ece3ce7c965f886
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r-- | src/quick/items/qquickitem.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index d9abd2c76a..d0a3b45047 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -7686,9 +7686,8 @@ void QQuickItem::ungrabMouse() return; } const auto &eventPoint = windowPriv->mousePointData()->eventPoint; - if (eventInDelivery->exclusiveGrabber(eventPoint) != this) - return; - eventInDelivery->setExclusiveGrabber(eventPoint, this); + if (eventInDelivery->exclusiveGrabber(eventPoint) == this) + eventInDelivery->setExclusiveGrabber(eventPoint, nullptr); } /*! |