macos: Cmd+W closes settings window if focused

This commit is contained in:
Mitchell Hashimoto
2023-03-26 10:43:57 -07:00
parent a1831ecacb
commit 8fa5a9d299

View File

@ -82,7 +82,11 @@ struct GhosttyApp: App {
}
func close() {
guard let surfaceView = focusedSurface else { return }
guard let surfaceView = focusedSurface else {
Self.closeWindow()
return
}
guard let surface = surfaceView.surface else { return }
ghostty.requestClose(surface: surface)
}