diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index ace18dd..b2db6ec 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1130,6 +1130,7 @@ void QWindowsWindow::setParent(const QPlatformWindow *newParent) void QWindowsWindow::setParent_sys(const QPlatformWindow *parent) const { + qDebug() << __FUNCTION__ << window() << parent; // Use GetAncestor instead of GetParent, as GetParent can return owner window for toplevels HWND oldParentHWND = GetAncestor(m_data.hwnd, GA_PARENT); HWND newParentHWND = 0; @@ -1147,6 +1148,7 @@ void QWindowsWindow::setParent_sys(const QPlatformWindow *parent) const newParentHWND = 0; if (newParentHWND != oldParentHWND) { + qDebug() << __FUNCTION__ << window() << "changed"; const bool wasTopLevel = oldParentHWND == 0; const bool isTopLevel = newParentHWND == 0; @@ -1157,8 +1159,11 @@ void QWindowsWindow::setParent_sys(const QPlatformWindow *parent) const // WS_CHILD/WS_POPUP must be manually set/cleared in addition // to dialog frames, etc (see SetParent() ) if the top level state changes. // Force toplevel state as QWindow::isTopLevel cannot be relied upon here. + qDebug() << __FUNCTION__ << window() << wasTopLevel << isTopLevel; if (wasTopLevel != isTopLevel) setWindowFlags_sys(window()->flags(), unsigned(isTopLevel ? WindowCreationData::ForceTopLevel : WindowCreationData::ForceChild)); + } else { + qDebug() << __FUNCTION__ << window() << "UNCHANGED"; } } @@ -1394,6 +1399,7 @@ void QWindowsWindow::setWindowFlags(Qt::WindowFlags flags) QWindowsWindow::WindowData QWindowsWindow::setWindowFlags_sys(Qt::WindowFlags wt, unsigned flags) const { + qDebug() << __FUNCTION__ << window() << wt << flags; WindowCreationData creationData; creationData.fromWindow(window(), wt, flags); creationData.applyWindowFlags(m_data.hwnd);