diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index e219f88..ba743a3 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -60,10 +60,12 @@ fn main() -> std::io::Result<()> { _ => {} }, SystemTrayEvent::LeftClick { .. } => { - let window = app_handle.get_window("main").unwrap(); - window.unminimize().unwrap(); - window.show().unwrap(); - window.set_focus().unwrap(); + if cfg![target_os = "windows"] { + let window = app_handle.get_window("main").unwrap(); + window.unminimize().unwrap(); + window.show().unwrap(); + window.set_focus().unwrap(); + } } _ => {} }) diff --git a/src-tauri/src/utils/resolve.rs b/src-tauri/src/utils/resolve.rs index 343b880..10aa7c9 100644 --- a/src-tauri/src/utils/resolve.rs +++ b/src-tauri/src/utils/resolve.rs @@ -16,6 +16,7 @@ pub fn resolve_setup(app: &App) { #[cfg(target_os = "macos")] { use tauri_plugin_vibrancy::MacOSVibrancy; + #[allow(deprecated)] window.apply_vibrancy(MacOSVibrancy::AppearanceBased); }