Эх сурвалжийг харах

chore: Remove prevent_close

MystiPanda 1 жил өмнө
parent
commit
83ca29d649
1 өөрчлөгдсөн 0 нэмэгдсэн , 19 устгасан
  1. 0 19
      src-tauri/src/main.rs

+ 0 - 19
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 {