mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-14 18:01:58 +00:00
macOS: fix flickering when creating new tab with glass style
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -78,7 +78,14 @@ class TerminalViewContainer: NSView {
|
||||
let newValue = DerivedConfig(config: config, preferredBackgroundColor: preferredBackgroundColor, cornerRadius: windowCornerRadius)
|
||||
guard newValue != derivedConfig else { return }
|
||||
derivedConfig = newValue
|
||||
DispatchQueue.main.async(execute: updateGlassEffectIfNeeded)
|
||||
|
||||
// Attach the glass effect synchronously if missing to prevent flicker when a new tab appears.
|
||||
// Existing updates remain deferred, as they can occur during SwiftUI rendering.
|
||||
if glassEffectView == nil {
|
||||
updateGlassEffectIfNeeded()
|
||||
} else {
|
||||
DispatchQueue.main.async(execute: updateGlassEffectIfNeeded)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user