fix: something

This commit is contained in:
GyDi 2022-01-31 23:34:58 +08:00
parent 76081f8d89
commit 7d8fa4d78a
No known key found for this signature in database
GPG Key ID: 58B15242BA8277A6
2 changed files with 7 additions and 4 deletions

View File

@ -60,11 +60,13 @@ fn main() -> std::io::Result<()> {
_ => {} _ => {}
}, },
SystemTrayEvent::LeftClick { .. } => { SystemTrayEvent::LeftClick { .. } => {
if cfg![target_os = "windows"] {
let window = app_handle.get_window("main").unwrap(); let window = app_handle.get_window("main").unwrap();
window.unminimize().unwrap(); window.unminimize().unwrap();
window.show().unwrap(); window.show().unwrap();
window.set_focus().unwrap(); window.set_focus().unwrap();
} }
}
_ => {} _ => {}
}) })
.invoke_handler(tauri::generate_handler![ .invoke_handler(tauri::generate_handler![

View File

@ -16,6 +16,7 @@ pub fn resolve_setup(app: &App) {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
{ {
use tauri_plugin_vibrancy::MacOSVibrancy; use tauri_plugin_vibrancy::MacOSVibrancy;
#[allow(deprecated)]
window.apply_vibrancy(MacOSVibrancy::AppearanceBased); window.apply_vibrancy(MacOSVibrancy::AppearanceBased);
} }