From 81cf3c7922ac8a4315558051317809701c921525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Thu, 9 Feb 2023 22:46:33 +0100 Subject: [PATCH] wasm: don't set window states for child windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit b7046ec2ac74e92a37b40e162108e78119b0a3b0) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/wasm/qwasmwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp index dafe3662eb9..1f09055f26b 100644 --- a/src/plugins/platforms/wasm/qwasmwindow.cpp +++ b/src/plugins/platforms/wasm/qwasmwindow.cpp @@ -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)) {