summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2017-10-03 10:25:22 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2017-10-06 07:29:06 +0000
commit7f7d9393809f64b37f161f64312d0704d23a11b7 (patch)
tree333c299c28a3d6ee668b578c214e5461cdc053db /src/plugins/platforms/windows
parentf62768d046528636789f901ac79e2cfa1843a7b7 (diff)
Windows: Let topmost and bottom windows use raise and lower respectively
329a029c361bcbaf70f3aa919693f0bef48a152f made ::raise and ::lower do nothing for topmost and bottommost windows. This made it impossible to e.g. raise one topmost window above another topmost window using QWindow::raise. Task-number: QTBUG-62021 Change-Id: I5f60816cbc48d69c0411e3bd68852d8bd8e300bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index bea849383d..16c2e16d64 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -875,7 +875,7 @@ void QWindowsBaseWindow::raise_sys()
const Qt::WindowType type = window()->type();
if (type == Qt::Popup
|| type == Qt::SubWindow // Special case for QTBUG-63121: MDI subwindows with WindowStaysOnTopHint
- || (window()->flags() & (Qt::WindowStaysOnTopHint | Qt::WindowStaysOnBottomHint)) == 0) {
+ || !(window()->flags() & Qt::WindowStaysOnBottomHint)) {
SetWindowPos(handle(), HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
}
}
@@ -883,7 +883,7 @@ void QWindowsBaseWindow::raise_sys()
void QWindowsBaseWindow::lower_sys()
{
qCDebug(lcQpaWindows) << __FUNCTION__ << this << window();
- if ((window()->flags() & (Qt::WindowStaysOnTopHint | Qt::WindowStaysOnBottomHint)) == 0)
+ if (!(window()->flags() & Qt::WindowStaysOnTopHint))
SetWindowPos(handle(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
}