macos: only process reopen if already activated

pull/7535/head
Mitchell Hashimoto 2025-06-07 07:01:08 -07:00
parent 396e53244d
commit b234cb2014
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 5 additions and 0 deletions

View File

@ -349,6 +349,11 @@ class AppDelegate: NSObject,
// the dock icon.
guard TerminalController.all.isEmpty else { return true }
// If the application isn't active yet then we don't want to process
// this because we're not ready. This happens sometimes in Xcode runs
// but I haven't seen it happen in releases. I'm unsure why.
guard applicationHasBecomeActive else { return true }
// No visible windows, open a new one.
_ = TerminalController.newWindow(ghostty)
return false