mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-17 15:21:50 +00:00
macos: close all windows
Fixes #1052 This implements a `close_all_windows` binding in the core and implements it for macOS specifically. This will ask for close confirmation if any surface in any of the windows requires confirmation. This is bound by default to option+shift+command+w to match Safari. The binding is generall option+command+w but users may expect this to also mean "Close All Other Tabs" which is the changed behavior if any tabs are present in a standard macOS application. So I chose to follow Safari instead. This doesn't implement this feature for GTK, that's left as an exercise for a contributor.
This commit is contained in:
@@ -221,12 +221,18 @@ pub const Action = union(enum) {
|
||||
reload_config: void,
|
||||
|
||||
/// Close the current "surface", whether that is a window, tab, split,
|
||||
/// etc. This only closes ONE surface.
|
||||
/// etc. This only closes ONE surface. This will trigger close confirmation
|
||||
/// as configured.
|
||||
close_surface: void,
|
||||
|
||||
/// Close the window, regardless of how many tabs or splits there may be.
|
||||
/// This will trigger close confirmation as configured.
|
||||
close_window: void,
|
||||
|
||||
/// Close all windows. This will trigger close confirmation as configured.
|
||||
/// This only works for macOS currently.
|
||||
close_all_windows: void,
|
||||
|
||||
/// Toggle fullscreen mode of window.
|
||||
toggle_fullscreen: void,
|
||||
|
||||
|
Reference in New Issue
Block a user