diff options
author | Morten Sørvig <[email protected]> | 2023-02-09 22:46:33 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <[email protected]> | 2023-02-13 14:52:09 +0000 |
commit | 81cf3c7922ac8a4315558051317809701c921525 (patch) | |
tree | 43b2543491ff803ec015f516967361b623b1b1d6 | |
parent | 5efec4016c18219f119ba7c9523a04c513b6887f (diff) |
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 <[email protected]>
(cherry picked from commit b7046ec2ac74e92a37b40e162108e78119b0a3b0)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
-rw-r--r-- | src/plugins/platforms/wasm/qwasmwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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)) { |