From 5630a4dd67d945aaf049d3bfbbd00eda05aba7d1 Mon Sep 17 00:00:00 2001 From: MystiPanda Date: Fri, 2 Feb 2024 15:57:03 +0800 Subject: [PATCH] chore: Remove prevent_close --- src-tauri/src/main.rs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 7723393a..fdc19a3f 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -114,25 +114,6 @@ fn main() -> std::io::Result<()> { resolve::resolve_reset(); api::process::kill_children(); } - #[cfg(target_os = "macos")] - tauri::RunEvent::WindowEvent { label, event, .. } => { - use tauri::Manager; - - if label == "main" { - match event { - tauri::WindowEvent::CloseRequested { api, .. } => { - api.prevent_close(); - let _ = resolve::save_window_size_position(&app_handle, true); - - app_handle.get_window("main").map(|win| { - let _ = win.hide(); - }); - } - _ => {} - } - } - } - #[cfg(not(target_os = "macos"))] tauri::RunEvent::WindowEvent { label, event, .. } => { if label == "main" { match event {