mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-30 08:45:23 +00:00
macos: fix quick terminal glassy background (#11229)
Fixes a regression from [#9032096](https://github.com/ghostty-org/ghostty/commit/9032096) 🥲 and clean some dead code On first launch of the quick terminal window, the container style is not properly updated; you'll have to reload the config to show the background. <img width="571" height="312" alt="IMG_4783" src="https://github.com/user-attachments/assets/c5d920ea-9ad8-494d-98c0-c560e36c4a31" />
This commit is contained in:
@@ -625,6 +625,8 @@ class QuickTerminalController: BaseTerminalController {
|
||||
window.isOpaque = true
|
||||
window.backgroundColor = .windowBackgroundColor
|
||||
}
|
||||
|
||||
terminalViewContainer?.ghosttyConfigDidChange(ghostty.config, preferredBackgroundColor: nil)
|
||||
}
|
||||
|
||||
private func showNoNewTabAlert() {
|
||||
|
||||
@@ -62,13 +62,6 @@ class TerminalViewContainer: NSView {
|
||||
updateGlassEffectTopInsetIfNeeded()
|
||||
}
|
||||
|
||||
@objc private func ghosttyConfigDidChange(_ notification: Notification) {
|
||||
guard let config = notification.userInfo?[
|
||||
Notification.Name.GhosttyConfigChangeKey
|
||||
] as? Ghostty.Config else { return }
|
||||
ghosttyConfigDidChange(config, preferredBackgroundColor: (window as? TerminalWindow)?.preferredBackgroundColor)
|
||||
}
|
||||
|
||||
func ghosttyConfigDidChange(_ config: Ghostty.Config, preferredBackgroundColor: NSColor?) {
|
||||
let newValue = DerivedConfig(config: config, preferredBackgroundColor: preferredBackgroundColor, cornerRadius: windowCornerRadius)
|
||||
guard newValue != derivedConfig else { return }
|
||||
|
||||
Reference in New Issue
Block a user