When main window closes, close all other ones too

This commit is contained in:
Lncvrt committed 2026-05-06 15:12:35 -07:00
1 parent 1d024296c2
commit f6b027d3b2
1 file changed
+7
+7
View File
@@ -758,6 +758,13 @@ pub fn run() {
}); });
let window = app.get_webview_window("main").unwrap(); let window = app.get_webview_window("main").unwrap();
let app_handle = app.handle().clone();
window.on_window_event(move |event| {
if let tauri::WindowEvent::CloseRequested { .. } = event {
app_handle.exit(0);
}
});
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
{ {