diff --git a/src/main.rs b/src/main.rs index 896ef0b..f4d8548 100644 --- a/src/main.rs +++ b/src/main.rs @@ -82,5 +82,12 @@ fn main() { Ok::<_, anyhow::Error>(()) }) .detach(); + + // Quit the application when the window is closed (specifically needed for macOS) + #[cfg(target_os = "macos")] + { + cx.on_window_closed(|cx| cx.quit()) + .detach(); + } }); }