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,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();
}
}
_ => {}
})

View File

@ -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);
}