summaryrefslogtreecommitdiff
path: root/macos/Sources/Features
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-09-12 20:40:45 -0700
committerMitchell Hashimoto <m@mitchellh.com>2025-09-12 20:41:02 -0700
commitd813d82da1b8b018e17a2b0cc0882acf2e2b0280 (patch)
treee688f2ee201a70444673bd395f8f5601c0da4e08 /macos/Sources/Features
parentbbf03cfa07db214ac600343ffb5e51d72154a0bb (diff)
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.
Diffstat (limited to 'macos/Sources/Features')
-rw-r--r--macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift15
1 files changed, 6 insertions, 9 deletions
diff --git a/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift
index f6ad6e56c..7ae628341 100644
--- a/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift
+++ b/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift
@@ -80,16 +80,13 @@ class TransparentTitlebarTerminalWindow: TerminalWindow {
// window background but with opacity. The window background is set using the
// "preferred background color" property.
//
- // As an inverse, if we don't have transparency, we don't bother with this because
- // the window background will be set to the correct color so we can just hide the
- // titlebar completely and we're good to go.
- if !isOpaque {
- if let titlebarView = titlebarContainer?.firstDescendant(withClassName: "NSTitlebarView") {
- titlebarView.wantsLayer = true
- titlebarView.layer?.backgroundColor = preferredBackgroundColor?.cgColor
- }
+ // Even if we aren't transparent, we still set this because this becomes the
+ // color of the titlebar in native fullscreen view.
+ if let titlebarView = titlebarContainer?.firstDescendant(withClassName: "NSTitlebarView") {
+ titlebarView.wantsLayer = true
+ titlebarView.layer?.backgroundColor = preferredBackgroundColor?.cgColor
}
-
+
// In all cases, we have to hide the background view since this has multiple subviews
// that force a background color.
titlebarBackgroundView?.isHidden = true