From e05e93cbb8d94dce1815d103249015423529dd52 Mon Sep 17 00:00:00 2001 From: Andy Carlson <2yinyang2@gmail.com> Date: Fri, 29 May 2026 23:37:14 -0700 Subject: [PATCH] prevent flickering windows on Windows by adding windows::Win32::System::Threading::DETACHED_PROCESS --- crates/command/src/async.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/command/src/async.rs b/crates/command/src/async.rs index bf89665536..d5aae45b04 100644 --- a/crates/command/src/async.rs +++ b/crates/command/src/async.rs @@ -100,11 +100,13 @@ impl Command { #[cfg(all(windows, not(feature = "test-util")))] { use async_process::windows::CommandExt; + use windows::Win32::System::Threading; // We need to set the `CREATE_BREAKAWAY_FROM_JOB` flag to avoid assigning // the process to the same Job Object as the Warp process, otherwise the // process will be killed when the Warp process is killed. - let flags = windows::Win32::System::Threading::CREATE_NO_WINDOW.0 - | windows::Win32::System::Threading::CREATE_BREAKAWAY_FROM_JOB.0; + let flags = Threading::CREATE_NO_WINDOW.0 + | Threading::DETACHED_PROCESS.0 + | Threading::CREATE_BREAKAWAY_FROM_JOB.0; inner.creation_flags(flags); } Self {