macos: only process reopen if already activated

This commit is contained in:
Mitchell Hashimoto
2025-06-07 07:01:08 -07:00
parent 396e53244d
commit b234cb2014

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