mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-29 08:15:20 +00:00
SurfaceView caches the background color set by OSC 11 in backgroundColor. TerminalWindow.preferredBackgroundColor consults that cache before falling back to derivedConfig.backgroundColor, so once OSC 11 has fired the cached value masks any later config change. After a light/dark theme auto-switch this leaves the window chrome on the previous theme's color until the application next emits OSC 11. In ghosttyConfigDidChange, after updating derivedConfig, drop the cache when it no longer matches the new config-derived background. A subsequent ghosttyColorDidChange repopulates it as before, so within-config OSC 11 behavior is unchanged.