wasm: don't set window states for child windows

Child windows can't be e.g. fullscreen independently
of their parent window. They should probably be allowed
to take the WindowActive state though, so let that
one trough.

Pick-to: 6.5
Change-Id: I857029f680d2fb274ba38705f6b687be45f46761
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Morten Sørvig 2023-02-09 22:46:33 +01:00 committed by Morten Johan Sørvig
parent 7c18642244
commit b7046ec2ac

View File

@ -384,6 +384,10 @@ void QWasmWindow::setWindowFlags(Qt::WindowFlags flags)
void QWasmWindow::setWindowState(Qt::WindowStates newState)
{
// Child windows can not have window states other than Qt::WindowActive
if (parent())
newState &= Qt::WindowActive;
const Qt::WindowStates oldState = m_state;
if (newState.testFlag(Qt::WindowMinimized)) {