From cdf4cc3d53980cff3b990e94c07bd904eb6f5f79 Mon Sep 17 00:00:00 2001 From: TomZz Date: Thu, 11 Jun 2026 02:15:19 +0800 Subject: [PATCH] fix: app fails to exit on windows/linux when last window is closed - Set QuitMode::Explicit only on macOS to allow the app to stay alive without windows. - Use the default QuitMode (CloseAll) on Windows and Linux so the application correctly exits when the main window is closed. --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 648ce96..e9dc6df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3581,9 +3581,14 @@ fn main() { ) .init(); + #[cfg(target_os = "macos")] let app = gpui_platform::application() .with_assets(Assets) .with_quit_mode(QuitMode::Explicit); + + #[cfg(not(target_os = "macos"))] + let app = gpui_platform::application() + .with_assets(Assets); app.on_reopen(|cx| { if cx.windows().is_empty() { open_main_window(cx);