diff options
author | Michael Dippold <michael.dippold@us.thalesgroup.com> | 2017-02-22 20:58:16 -0800 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-02-28 14:29:10 +0000 |
commit | 16389a1f247f14965ed0286e4fdab6bc2b1621bc (patch) | |
tree | 3197ff9434e5259b23524dfb9cccc28b202b3b79 /src/quick | |
parent | d1ae334077aeb948ca191e22231d20b54ea5f956 (diff) |
Ensure mouse ungrab is called when touch is also true
Currently when removeGrabber is called with both mouse true and
touch true, the touch logic blocks the ungrab mouse from being
triggered as q->mouseGrabberItem() is then null.
Task-number: QTBUG-57797
Task-number: QTBUG-59098
Change-Id: Icb4d00cf876c9fd0930b50f927f68dfba172dc29
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index f90384b3b6..4dc8cd0a37 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -811,6 +811,10 @@ void QQuickWindowPrivate::grabTouchPoints(QQuickItem *grabber, const QVector<int void QQuickWindowPrivate::removeGrabber(QQuickItem *grabber, bool mouse, bool touch) { Q_Q(QQuickWindow); + if (Q_LIKELY(mouse) && q->mouseGrabberItem() == grabber) { + qCDebug(DBG_MOUSE_TARGET) << "removeGrabber" << q->mouseGrabberItem() << "-> null"; + setMouseGrabber(nullptr); + } if (Q_LIKELY(touch)) { const auto touchDevices = QQuickPointerDevice::touchDevices(); for (auto device : touchDevices) { @@ -824,10 +828,6 @@ void QQuickWindowPrivate::removeGrabber(QQuickItem *grabber, bool mouse, bool to } } } - if (Q_LIKELY(mouse) && q->mouseGrabberItem() == grabber) { - qCDebug(DBG_MOUSE_TARGET) << "removeGrabber" << q->mouseGrabberItem() << "-> null"; - setMouseGrabber(nullptr); - } } /*! |