Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

fix window close bug

CJ Pais9f3a6f5f2f15
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 18f2a57c..3dd132a1 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -150,10 +150,12 @@ pub fn run() {
Ok(())
})
- .on_window_event(|app, event| match event {
+ .on_window_event(|window, event| match event {
tauri::WindowEvent::CloseRequested { api, .. } => {
- app.hide().unwrap();
api.prevent_close();
+
+ // TODO may be different on windows, this works for macos
+ tauri::AppHandle::hide(window.app_handle()).unwrap();
}
_ => {}
})