macOS 26: Always set titlebarview background color for transparent title

This fixes an issue where new tabs would not have the proper transparent
background set whilst in native fullscreen. This is because in native
fullscreen, the NSTitlebarView always is visible, so our guard was
preventing us from setting it before.
pull/8611/head
Mitchell Hashimoto 2025-09-12 20:40:45 -07:00
parent bbf03cfa07
commit d813d82da1
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 6 additions and 9 deletions

View File

@ -80,16 +80,13 @@ class TransparentTitlebarTerminalWindow: TerminalWindow {
// window background but with opacity. The window background is set using the // window background but with opacity. The window background is set using the
// "preferred background color" property. // "preferred background color" property.
// //
// As an inverse, if we don't have transparency, we don't bother with this because // Even if we aren't transparent, we still set this because this becomes the
// the window background will be set to the correct color so we can just hide the // color of the titlebar in native fullscreen view.
// titlebar completely and we're good to go. if let titlebarView = titlebarContainer?.firstDescendant(withClassName: "NSTitlebarView") {
if !isOpaque { titlebarView.wantsLayer = true
if let titlebarView = titlebarContainer?.firstDescendant(withClassName: "NSTitlebarView") { titlebarView.layer?.backgroundColor = preferredBackgroundColor?.cgColor
titlebarView.wantsLayer = true
titlebarView.layer?.backgroundColor = preferredBackgroundColor?.cgColor
}
} }
// In all cases, we have to hide the background view since this has multiple subviews // In all cases, we have to hide the background view since this has multiple subviews
// that force a background color. // that force a background color.
titlebarBackgroundView?.isHidden = true titlebarBackgroundView?.isHidden = true