mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: don't steal focus for config errors
This commit is contained in:
@ -188,8 +188,11 @@ class AppDelegate: NSObject, ObservableObject, NSApplicationDelegate, GhosttyApp
|
|||||||
// If we have configuration errors, we need to show them.
|
// If we have configuration errors, we need to show them.
|
||||||
let c = ConfigurationErrorsController.sharedInstance
|
let c = ConfigurationErrorsController.sharedInstance
|
||||||
c.model.errors = state.configErrors()
|
c.model.errors = state.configErrors()
|
||||||
Self.logger.warning("TEST did reload, count=\(c.model.errors.count)")
|
if (c.model.errors.count > 0) {
|
||||||
if (c.model.errors.count > 0) { c.showWindow(self) }
|
if (c.window == nil || !c.window!.isVisible) {
|
||||||
|
c.showWindow(self)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//MARK: - Dock Menu
|
//MARK: - Dock Menu
|
||||||
|
@ -32,7 +32,6 @@ class ConfigurationErrorsController: NSWindowController, NSWindowDelegate {
|
|||||||
window.center()
|
window.center()
|
||||||
window.level = .popUpMenu
|
window.level = .popUpMenu
|
||||||
window.contentView = NSHostingView(rootView: ConfigurationErrorsView(model: model))
|
window.contentView = NSHostingView(rootView: ConfigurationErrorsView(model: model))
|
||||||
window.makeKeyAndOrderFront(self)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//MARK: - NSWindowDelegate
|
//MARK: - NSWindowDelegate
|
||||||
|
Reference in New Issue
Block a user