|
@@ -37,11 +37,12 @@ impl Cmd {
|
|
|
}
|
|
|
|
|
|
#[module_command_handler(process_exit)]
|
|
|
- fn exit<R: Runtime>(_context: InvokeContext<R>, exit_code: i32) -> super::Result<()> {
|
|
|
+ fn exit<R: Runtime>(context: InvokeContext<R>, exit_code: i32) -> super::Result<()> {
|
|
|
// would be great if we can have a handler inside tauri
|
|
|
// who close all window and emit an event that user can catch
|
|
|
// if they want to process something before closing the app
|
|
|
- std::process::exit(exit_code);
|
|
|
+ context.window.app_handle.exit(exit_code);
|
|
|
+ Ok(())
|
|
|
}
|
|
|
}
|
|
|
|