macos: integrate needsConfirmQuit to quit if all windows are at prompt

This commit is contained in:
Mitchell Hashimoto
2023-09-11 15:44:28 -07:00
parent 56ccadd7f1
commit 999d17c49d
2 changed files with 9 additions and 0 deletions

View File

@@ -40,6 +40,12 @@ extension Ghostty {
}
}
/// True if we need to confirm before quitting.
var needsConfirmQuit: Bool {
guard let app = app else { return false }
return ghostty_app_needs_confirm_quit(app)
}
/// Cached clipboard string for `read_clipboard` callback.
private var cached_clipboard_string: String? = nil