diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-03-31 01:00:13 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-03-31 01:00:13 +0200 |
commit | ffb2c2ac6c3ba40acbe13a39899a72049585b427 (patch) | |
tree | dbee14e6d1641e02ea1fd5fc67ce001ab12776ef /src/plugins | |
parent | 6d0044f1dcffebc29dccd9d37d90f8abdb941a88 (diff) | |
parent | dbdd5f0ffbce52c8b789ed09f1aa3f1da6c02e23 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I33b47095efdfe0ba698c6a88ca41ec911f432208
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 9fff4b5e42..9872b6b4e0 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1161,23 +1161,19 @@ void QWindowsWindow::fireExpose(const QRegion ®ion, bool force) QWindowSystemInterface::handleExposeEvent(window(), region); } -static inline QWindow *findTransientChild(const QWindow *parent) -{ - foreach (QWindow *w, QGuiApplication::topLevelWindows()) - if (w->transientParent() == parent) - return w; - return 0; -} - void QWindowsWindow::destroyWindow() { qCDebug(lcQpaWindows) << __FUNCTION__ << this << window() << m_data.hwnd; if (m_data.hwnd) { // Stop event dispatching before Window is destroyed. setFlag(WithinDestroy); // Clear any transient child relationships as Windows will otherwise destroy them (QTBUG-35499, QTBUG-36666) - if (QWindow *transientChild = findTransientChild(window())) - if (QWindowsWindow *tw = QWindowsWindow::windowsWindowOf(transientChild)) - tw->updateTransientParent(); + const auto tlw = QGuiApplication::topLevelWindows(); + for (QWindow *w : tlw) { + if (w->transientParent() == window()) { + if (QWindowsWindow *tw = QWindowsWindow::windowsWindowOf(w)) + tw->updateTransientParent(); + } + } QWindowsContext *context = QWindowsContext::instance(); if (context->windowUnderMouse() == window()) context->clearWindowUnderMouse(); |