diff options
author | Andy Shaw <andy.shaw@digia.com> | 2014-09-23 21:03:41 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@digia.com> | 2014-09-24 14:39:04 +0200 |
commit | eef1e51f97a652907bda29357c20388ab36f26ec (patch) | |
tree | d5a86907e6406adea6ed75726eccae7779aa06b0 /src/plugins/platforms/windows | |
parent | 1168ed8f6e2ed8f161e14bda7b2bdbd97a6cc329 (diff) |
Ensure a window with no stays on top flag is not staying on top
On Windows, if a window was previously staying on top then it needs to be
explicitly told to have HWND_NOTOPMOST set when it is recreated. If it was
not staying on top before the flag has no effect so it is safe to always
set it in this case.
Task-number: QTBUG-30359
Change-Id: I8be546886d6ae61032113c241f5903bcce04c163
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 995e396584..15c199f6dc 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -652,7 +652,7 @@ void WindowCreationData::initialize(HWND hwnd, bool frameChange, qreal opacityLe } else if (flags & Qt::WindowStaysOnBottomHint) { SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0, swpFlags); } else if (frameChange) { // Force WM_NCCALCSIZE with wParam=1 in case of custom margins. - SetWindowPos(hwnd, 0, 0, 0, 0, 0, swpFlags); + SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, swpFlags); } if (flags & (Qt::CustomizeWindowHint|Qt::WindowTitleHint)) { HMENU systemMenu = GetSystemMenu(hwnd, FALSE); |