summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-01 12:59:42 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-03 09:36:25 +0000
commit66be5445e64b54bf60069dfee5dd918459e3deed (patch)
tree2d8ab2313ead665f18f0664b0caf3cfe3f44b840
parentf0ff73f631093b11c77d8d6fb548acfe8eb62583 (diff)
Windows: Implement Qt::WindowStaysOnBottomHint
Set the Z-order to HWND_BOTTOM in that case. Add a doc note stating that it only works for frameless or full screen windows. Task-number: QTBUG-53717 Change-Id: I7abf219a88aac715c51d27d925504da9e91b56f1 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/corelib/global/qnamespace.qdoc8
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 36f2aaee72..8e46f3f0fd 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2271,13 +2271,17 @@
correctly.
\value WindowStaysOnBottomHint Informs the window system that the
- window should stay on bottom of all other windows. Note
- that on X11 this hint will work only in window managers
+ window should stay on bottom of all other windows.
+
+ \note On X11, this hint will work only in window managers
that support _NET_WM_STATE_BELOW atom. If a window always
on the bottom has a parent, the parent will also be left on
the bottom. This window hint is currently not implemented
for \macos.
+ \note On Windows, this will work only for frameless or
+ full-screen windows.
+
\value WindowTransparentForInput Informs the window system that this window
is used only for output (displaying something) and does not take input.
Therefore input events should pass through as if it wasn't there.
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index aa40d422fb..ca87f1b6a4 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -2081,6 +2081,8 @@ bool QWindowsWindow::handleGeometryChangingMessage(MSG *message, const QWindow *
HWND desktopHWND = GetDesktopWindow();
platformWindow->m_data.embedded = !parentWindow && parentHWND && (parentHWND != desktopHWND);
}
+ if (qWindow->flags().testFlag(Qt::WindowStaysOnBottomHint))
+ windowPos->hwndInsertAfter = HWND_BOTTOM;
}
if (!qWindow->isTopLevel()) // Implement hasHeightForWidth().
return false;