diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index b8e5dd8..a49096f 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -55,7 +55,13 @@ pub fn run_app() { }) .on_window_event(|event| { if let tauri::WindowEvent::CloseRequested { api, .. } = event.event() { + + #[cfg(target_os = "macos")] event.window().minimize().unwrap(); + + #[cfg(not(target_os = "macos"))] + event.window().hide().unwrap(); + api.prevent_close(); } })