mirror of https://github.com/qt/qtbase.git
Windows QPA: Do not raise/lower windows with Qt::WindowStaysOnTop/BottomHint
Prospectively helps to fix Qt::WindowStaysOnTopHint not working reliably on Windows by preventing HWND_TOPMOST being cleared in raise(). Task-number: QTBUG-50271 Change-Id: I88f916a1cf8a2082236360b9eab874ad22b85762 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This commit is contained in:
parent
791df9821d
commit
329a029c36
|
@ -870,13 +870,15 @@ void QWindowsBaseWindow::hide_sys() // Normal hide, do not activate other window
|
||||||
void QWindowsBaseWindow::raise_sys()
|
void QWindowsBaseWindow::raise_sys()
|
||||||
{
|
{
|
||||||
qCDebug(lcQpaWindows) << __FUNCTION__ << this << window();
|
qCDebug(lcQpaWindows) << __FUNCTION__ << this << window();
|
||||||
SetWindowPos(handle(), HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
if ((window()->flags() & (Qt::WindowStaysOnTopHint | Qt::WindowStaysOnBottomHint)) == 0)
|
||||||
|
SetWindowPos(handle(), HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWindowsBaseWindow::lower_sys()
|
void QWindowsBaseWindow::lower_sys()
|
||||||
{
|
{
|
||||||
qCDebug(lcQpaWindows) << __FUNCTION__ << this << window();
|
qCDebug(lcQpaWindows) << __FUNCTION__ << this << window();
|
||||||
SetWindowPos(handle(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
if ((window()->flags() & (Qt::WindowStaysOnTopHint | Qt::WindowStaysOnBottomHint)) == 0)
|
||||||
|
SetWindowPos(handle(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWindowsBaseWindow::setWindowTitle_sys(const QString &title)
|
void QWindowsBaseWindow::setWindowTitle_sys(const QString &title)
|
||||||
|
|
Loading…
Reference in New Issue