mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 05:03:45 +08:00
chore: remove useless hooks
the window is not closed, it is minimized, so the position still exists
This commit is contained in:
parent
b809b9bb80
commit
e40ea38112
@ -6,7 +6,7 @@ use crate::{
|
||||
};
|
||||
use anyhow::{anyhow, Result};
|
||||
use once_cell::sync::OnceCell;
|
||||
use std::{env::temp_dir, path::PathBuf};
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub const RUNTIME_CONFIG: &str = "clash-verge.yaml";
|
||||
pub const CHECK_CONFIG: &str = "clash-verge-check.yaml";
|
||||
|
@ -143,13 +143,10 @@ pub fn run() {
|
||||
match event {
|
||||
tauri::WindowEvent::CloseRequested { api, .. } => {
|
||||
println!("closing window...");
|
||||
let _ = resolve::save_window_size_position(true);
|
||||
api.prevent_close();
|
||||
let window = core::handle::Handle::global().get_window().unwrap();
|
||||
log_err!(window.minimize());
|
||||
let _ = resolve::save_window_size_position(true);
|
||||
}
|
||||
tauri::WindowEvent::Moved(_) | tauri::WindowEvent::Resized(_) => {
|
||||
let _ = resolve::save_window_size_position(false);
|
||||
}
|
||||
tauri::WindowEvent::Focused(true) => {
|
||||
#[cfg(target_os = "macos")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user