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>
This commit is contained in:
Morteza Jamshidi 2024-11-20 14:00:51 +01:00
parent 13109ba350
commit cf9c94e851

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)