Replies: 1 comment
-
gonna file an issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
tauri::Builder::default()
.on_window_event(|event| match event.event() {
tauri::WindowEvent::CloseRequested { .. } => {
/* CODE HERE */
}
_ => {}})
.run(tauri::generate_context!())
.expect("error while running tauri application");
I use something like this for default function to do some cleanup after the user closes the program, but I noticed that if you close the program using alt+f4, using task manager, using tiling wm close keybind or using kill-all and other killing ways, the program doesn't execute the CloseRequested event code. Any way to fix this issue? At worst I can write a secondary no window no terminal program that watches if the first one dies but it is a utterly terrible band-aid solution. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions