From eef1e51f97a652907bda29357c20388ab36f26ec Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 23 Sep 2014 21:03:41 +0200 Subject: 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 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowswindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows') 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); -- cgit v1.2.3