fix Windows build?

This commit is contained in:
CJ Pais 2025-05-13 14:15:41 -07:00
parent 1b53bc1bc7
commit ef607db260

View file

@ -99,6 +99,7 @@ pub fn run() {
.on_window_event(|window, event| match event { .on_window_event(|window, event| match event {
tauri::WindowEvent::CloseRequested { api, .. } => { tauri::WindowEvent::CloseRequested { api, .. } => {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
{
let res = window let res = window
.app_handle() .app_handle()
.set_activation_policy(tauri::ActivationPolicy::Accessory); .set_activation_policy(tauri::ActivationPolicy::Accessory);
@ -111,6 +112,7 @@ pub fn run() {
// TODO may be different on windows, this works for macos // TODO may be different on windows, this works for macos
tauri::AppHandle::hide(window.app_handle()).unwrap(); tauri::AppHandle::hide(window.app_handle()).unwrap();
} }
}
_ => {} _ => {}
}) })
.invoke_handler(tauri::generate_handler![ .invoke_handler(tauri::generate_handler![