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.

Change-Id: I857029f680d2fb274ba38705f6b687be45f46761
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit b7046ec2ac74e92a37b40e162108e78119b0a3b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Morten Sørvig 2023-02-09 22:46:33 +01:00 committed by Qt Cherry-pick Bot
parent 5efec4016c
commit 81cf3c7922

View File

@ -348,6 +348,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)) {