Fix ⌘Q not quitting on macOS
The Quit item was role:"quit" with no accelerator, so ⌘Q was never bound. Make it a custom action + accelerator "q" dispatched to Utils.quit(), which emits before-quit so the existing guard (active transfers / unsaved editors, native confirm dialog) runs instead of the OS terminating directly. Handled before the manager-open check so ⌘Q works with the connection manager open too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -245,6 +245,12 @@ ApplicationMenu.on("application-menu-clicked", (event) => {
|
||||
showAbout();
|
||||
return;
|
||||
}
|
||||
if (action === "quit") {
|
||||
// Utils.quit() emits before-quit -> the guard runs (transfers/unsaved).
|
||||
// Handled before the manager check so ⌘Q quits even with it open.
|
||||
Utils.quit();
|
||||
return;
|
||||
}
|
||||
// the manager is modal to the main window — don't drive main behind it
|
||||
if (manager.isOpen()) return;
|
||||
rpc.send.menuAction({ action });
|
||||
|
||||
Reference in New Issue
Block a user