Show window without activating if WindowDoesNotAcceptFocus flag is set

Added an extra condition to only show the window (without activation)
if Qt::WindowDoesNotAcceptFocus flag is set. (Mostly from qml)

Fixes: QTBUG-130912
Change-Id: I6b7a9cd03d726315b8531600c6a8b33436a3348b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cf9c94e85160a9d0f03e284ff92995900076faee)
Reviewed-by: Morteza Jamshidi <morteza.jamshidi@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Morteza Jamshidi 2024-11-20 14:00:51 +01:00 committed by Vladimir Belyavsky
parent 504ec42a0f
commit ce0349b410

View File

@ -2005,7 +2005,11 @@ void QWindowsWindow::show_sys() const
} // Qt::WindowMaximized
} // !Qt::WindowMinimized
}
if (type == Qt::Popup || type == Qt::ToolTip || type == Qt::Tool || testShowWithoutActivating(w))
if (type == Qt::Popup ||
type == Qt::ToolTip ||
type == Qt::Tool ||
(flags & Qt::WindowDoesNotAcceptFocus) ||
testShowWithoutActivating(w))
sm = SW_SHOWNOACTIVATE;
if (w->windowStates() & Qt::WindowMaximized)