macOS: support `close_all_windows` action

pull/9552/head
Lukas 2025-11-10 17:54:46 +01:00
parent 848ee92169
commit f5bddb346c
No known key found for this signature in database
GPG Key ID: 845CB61BD38F4E49
1 changed files with 7 additions and 1 deletions

View File

@ -604,7 +604,8 @@ extension Ghostty {
scrollbar(app, target: target, v: action.action.scrollbar)
case GHOSTTY_ACTION_CLOSE_ALL_WINDOWS:
fallthrough
closeAllWindows(app, target: target)
case GHOSTTY_ACTION_TOGGLE_TAB_OVERVIEW:
fallthrough
case GHOSTTY_ACTION_TOGGLE_WINDOW_DECORATIONS:
@ -878,6 +879,11 @@ extension Ghostty {
}
}
private static func closeAllWindows(_ app: ghostty_app_t, target: ghostty_target_s) {
guard let appDelegate = NSApplication.shared.delegate as? AppDelegate else { return }
appDelegate.closeAllWindows(nil)
}
private static func toggleFullscreen(
_ app: ghostty_app_t,
target: ghostty_target_s,