diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 8f376162ef..7e79e1c819 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -424,6 +424,7 @@ QWindowsWindow::WindowData if (desktop) { // desktop widget. No frame, hopefully? result.hwnd = GetDesktopWindow(); result.geometry = frameGeometry(result.hwnd, true); + result.embedded = false; if (QWindowsContext::verboseWindows) qDebug().nospace() << "Created desktop window " << w << result.hwnd; return result; @@ -830,6 +831,21 @@ bool QWindowsWindow::isActive() const return false; } +bool QWindowsWindow::isEmbedded(const QPlatformWindow *parentWindow) const +{ + if (parentWindow) { + const QWindowsWindow *ww = static_cast<const QWindowsWindow *>(parentWindow); + const HWND hwnd = ww->handle(); + if (!IsChild(hwnd, m_data.hwnd)) + return false; + } + + if (!m_data.embedded && parent()) + return parent()->isEmbedded(0); + + return m_data.embedded; +} + // partially from QWidgetPrivate::show_sys() void QWindowsWindow::show_sys() const { |