diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2012-11-08 17:43:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-21 11:58:16 +0100 |
commit | 7b2e2117162594a2d0234bb02408f5b5a446488b (patch) | |
tree | 39986fa636ea3b44b31f50af51582b7529994b27 /src/quick | |
parent | 3f86278a77cf4918a2698aae317a9766d9b63505 (diff) |
Ungrab mouse upon leave event.
The event signals that the mouse has left the window.
This happens also when a popup is shown (overlapping the original window).
Before a mouse area would still think it was in pressed state
when the popup (QWindow/QMenu) was shown and even after the popup was closed.
Change-Id: I6d32571f5a473610f60e9476850989ff665edb93
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 4ea31a0d6f..806766d00b 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1131,6 +1131,8 @@ bool QQuickWindow::event(QEvent *e) case QEvent::Leave: d->clearHover(); d->lastMousePosition = QPoint(); + if (d->mouseGrabberItem) + d->mouseGrabberItem->ungrabMouse(); break; #ifndef QT_NO_DRAGANDDROP case QEvent::DragEnter: |