From 845a6432b7486ae023440f7367120741fbe3dde2 Mon Sep 17 00:00:00 2001 From: Neyl-123 <97339070+Neyl-123@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:00:58 +0100 Subject: [PATCH] 226_fix_overlayed_closing See Issue #226 in upstream repo --- apps/desktop/src-tauri/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs index 8911c88f..301097e1 100644 --- a/apps/desktop/src-tauri/src/main.rs +++ b/apps/desktop/src-tauri/src/main.rs @@ -179,7 +179,12 @@ fn main() { win.hide().unwrap(); } - api.prevent_close(); + if label == MAIN_WINDOW_NAME { + app.save_window_state(StateFlags::POSITION | StateFlags::SIZE); + std::process::exit(0); + } else { + api.prevent_close(); + } } });