diff --git a/macos/Sources/AppDelegate.swift b/macos/Sources/AppDelegate.swift index 3f81349bc..6785c3a30 100644 --- a/macos/Sources/AppDelegate.swift +++ b/macos/Sources/AppDelegate.swift @@ -188,8 +188,11 @@ class AppDelegate: NSObject, ObservableObject, NSApplicationDelegate, GhosttyApp // If we have configuration errors, we need to show them. let c = ConfigurationErrorsController.sharedInstance c.model.errors = state.configErrors() - Self.logger.warning("TEST did reload, count=\(c.model.errors.count)") - if (c.model.errors.count > 0) { c.showWindow(self) } + if (c.model.errors.count > 0) { + if (c.window == nil || !c.window!.isVisible) { + c.showWindow(self) + } + } } //MARK: - Dock Menu diff --git a/macos/Sources/Features/Settings/ConfigurationErrorsController.swift b/macos/Sources/Features/Settings/ConfigurationErrorsController.swift index 9e4b2a185..fc74a2aad 100644 --- a/macos/Sources/Features/Settings/ConfigurationErrorsController.swift +++ b/macos/Sources/Features/Settings/ConfigurationErrorsController.swift @@ -32,7 +32,6 @@ class ConfigurationErrorsController: NSWindowController, NSWindowDelegate { window.center() window.level = .popUpMenu window.contentView = NSHostingView(rootView: ConfigurationErrorsView(model: model)) - window.makeKeyAndOrderFront(self) } //MARK: - NSWindowDelegate