Function build_startupinfo
pub(crate) fn build_startupinfo(with_keyboard_focus: bool) -> STARTUPINFOWExpand description
Build a STARTUPINFOW for WindowsApi::create_process_with_args.
When with_keyboard_focus is false, STARTF_USESHOWWINDOW and
SW_SHOWNOACTIVATE are populated so the new console appears without
stealing foreground focus. Otherwise the struct is left at its default
(the new process picks its own show-window behaviour).
§Arguments
with_keyboard_focus- Whether the spawned process is allowed to take foreground focus when its console appears.
§Returns
A STARTUPINFOW with cb set and, when applicable, the no-activate
show-window flags applied.