wezterm: lua: run_child_process CREATE_NO_WINDOW
On windows, prevent console subsystem processes spawned by lua (such as the `wsl -l` example configuration) from momentarily popping up and stealing the focus. This was happening too fast to see in most cases, but could cause the wezterm window to momentarily repaint its title bar with lose focus before regaining it.
This commit is contained in:
1 parent
bb9504d626
commit
f1192471fb
1 file changed
+6
@@ -297,6 +297,12 @@ fn run_child_process<'lua>(
|
||||
cmd.args(&args[1..]);
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use std::os::windows::process::CommandExt;
|
||||
cmd.creation_flags(winapi::um::winbase::CREATE_NO_WINDOW);
|
||||
}
|
||||
|
||||
let output = cmd.output().map_err(|e| mlua::Error::external(e))?;
|
||||
|
||||
Ok((
|
||||
|
||||
Reference in new issue
Block a user