Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src-tauri/src/commands/system_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,16 +580,26 @@ pub async fn resolve_close_request(
save_system_close_behavior_settings(&db.conn, behavior).await?;
}

// `orderOut:` and process exit both leave a macOS native-fullscreen
// Space standing (issue #507), and this is a second entry point into
// both: the press that raised the dialog may have arrived windowed and
// the user can go fullscreen while it is up, so the answer cannot
// assume the close path already drained.
match behavior {
CloseWindowBehavior::Minimize => {
if let Some(window) = tauri::Manager::get_webview_window(&app, "main") {
let _ = window.hide();
crate::commands::windows::with_macos_fullscreen_drained(&app, move || {
let _ = window.hide();
});
}
}
// Reuses the tray-quit path: `exit` triggers `ExitRequested`, which
// sets `APP_QUITTING` and runs the ACP-disconnect / terminal-reclaim
// cleanup already wired there.
CloseWindowBehavior::Exit => tauri::Manager::app_handle(&app).exit(0),
CloseWindowBehavior::Exit => {
let quit = tauri::Manager::app_handle(&app).clone();
crate::commands::windows::with_macos_fullscreen_drained(&app, move || quit.exit(0));
}
CloseWindowBehavior::Ask => {}
}

Expand Down
Loading
Loading