summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEven Oscar Andersen <even.oscar.andersen@qt.io>2024-02-26 12:46:35 +0800
committerEven Oscar Andersen <even.oscar.andersen@qt.io>2024-03-21 17:50:00 +0100
commit0737fca6b2f4b29b7e4eda221147187cf72f96f3 (patch)
tree5ac870f68631e07020006003dc2147c902c62114 /src
parentedb8bac39b9e7c16925aa0762bbf7feaf6f552ab (diff)
wasm: Qt::WA_ShowWithoutActivating was not respected
The Qt::WA_ShowWithoutActivating flag was not respected Added test in the part of the code that calls requestActivateWindow Added selenium focus test Fixes: QTBUG-122776 Change-Id: I1a248ed4352f86376d615a4cb7022e7ea095d4e7 Reviewed-by: Piotr WierciƄski <piotr.wiercinski@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/wasm/qwasmwindowtreenode.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/wasm/qwasmwindowtreenode.cpp b/src/plugins/platforms/wasm/qwasmwindowtreenode.cpp
index e16410dcde..ea8d8dbcfa 100644
--- a/src/plugins/platforms/wasm/qwasmwindowtreenode.cpp
+++ b/src/plugins/platforms/wasm/qwasmwindowtreenode.cpp
@@ -39,8 +39,12 @@ void QWasmWindowTreeNode::onSubtreeChanged(QWasmWindowTreeNodeChangeType changeT
QWasmWindowTreeNode *parent, QWasmWindow *child)
{
if (changeType == QWasmWindowTreeNodeChangeType::NodeInsertion && parent == this
- && m_childStack.topWindow()) {
- m_childStack.topWindow()->requestActivateWindow();
+ && m_childStack.topWindow()
+ && m_childStack.topWindow()->window()) {
+
+ const QVariant showWithoutActivating = m_childStack.topWindow()->window()->property("_q_showWithoutActivating");
+ if (!showWithoutActivating.isValid() || !showWithoutActivating.toBool())
+ m_childStack.topWindow()->requestActivateWindow();
}
if (parentNode())