mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-12-30 18:22:12 +00:00
macos: set the app icon in syncAppearance to delay the icon update
Fixes #8734 This forces the app icon to be set on another event loop tick from the main startup. In the future, we should load and set the icon completely in another thread. It appears that all the logic we have is totally thread-safe.
This commit is contained in:
@@ -860,6 +860,11 @@ class AppDelegate: NSObject,
|
|||||||
} else {
|
} else {
|
||||||
GlobalEventTap.shared.disable()
|
GlobalEventTap.shared.disable()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sync the appearance of our app with the theme specified in the config.
|
||||||
|
private func syncAppearance(config: Ghostty.Config) {
|
||||||
|
NSApplication.shared.appearance = .init(ghosttyConfig: config)
|
||||||
|
|
||||||
switch (config.macosIcon) {
|
switch (config.macosIcon) {
|
||||||
case .official:
|
case .official:
|
||||||
@@ -909,11 +914,6 @@ class AppDelegate: NSObject,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sync the appearance of our app with the theme specified in the config.
|
|
||||||
private func syncAppearance(config: Ghostty.Config) {
|
|
||||||
NSApplication.shared.appearance = .init(ghosttyConfig: config)
|
|
||||||
}
|
|
||||||
|
|
||||||
//MARK: - Restorable State
|
//MARK: - Restorable State
|
||||||
|
|
||||||
/// We support NSSecureCoding for restorable state. Required as of macOS Sonoma (14) but a good idea anyways.
|
/// We support NSSecureCoding for restorable state. Required as of macOS Sonoma (14) but a good idea anyways.
|
||||||
|
|||||||
Reference in New Issue
Block a user