diff options
author | Sergio Martins <sergio.martins@kdab.com> | 2016-07-26 15:34:48 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2016-08-12 19:13:12 +0000 |
commit | 56d711667f4601016b474b3d463ce07659c42b9a (patch) | |
tree | cc668e87513c62a80eb6fd90e73a117e65ba30a0 /src/controls/qquickpopupwindow.cpp | |
parent | 756a169e2530987f1b875589d196877e93704858 (diff) | |
download | qtquickcontrols-56d711667f4601016b474b3d463ce07659c42b9a.tar.gz |
Don't activate transient parent if it was closed meanwhile
Closing a window while a popup is open should not trigger an activation event
when the popup is closed.
Prevents QGuiApplicationPrivate::focus_window from being changed to a stale window,
which happens inside QGuiApplicationPrivate::processActivatedEvent().
Change-Id: I3145b3d191abb20d56fa9acbec8a0776a6bf8526
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/controls/qquickpopupwindow.cpp')
-rw-r--r-- | src/controls/qquickpopupwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/controls/qquickpopupwindow.cpp b/src/controls/qquickpopupwindow.cpp index 88d91137..ac961709 100644 --- a/src/controls/qquickpopupwindow.cpp +++ b/src/controls/qquickpopupwindow.cpp @@ -224,7 +224,8 @@ void QQuickPopupWindow::hideEvent(QHideEvent *e) { if (QWindow *tp = !m_needsActivatedEvent ? transientParent() : 0) { m_needsActivatedEvent = true; - QWindowSystemInterface::handleWindowActivated(tp); + if (tp->isVisible()) + QWindowSystemInterface::handleWindowActivated(tp); } QQuickWindow::hideEvent(e); |