From a874280e4b0943ce708fc4b72f3ae4235d8c429a Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Thu, 15 Feb 2024 22:53:44 +0100 Subject: [PATCH] Avoid repainting new tab button for native tab bar --- macos/Sources/Features/Terminal/TerminalWindow.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/macos/Sources/Features/Terminal/TerminalWindow.swift b/macos/Sources/Features/Terminal/TerminalWindow.swift index 44864d511..5fa06cfb0 100644 --- a/macos/Sources/Features/Terminal/TerminalWindow.swift +++ b/macos/Sources/Features/Terminal/TerminalWindow.swift @@ -16,12 +16,18 @@ class TerminalWindow: NSWindow { } super.becomeKey() - updateNewTabButtonOpacity() + + if titlebarTabs { + updateNewTabButtonOpacity() + } } override func resignKey() { super.resignKey() - updateNewTabButtonOpacity() + + if titlebarTabs { + updateNewTabButtonOpacity() + } } // MARK: - Titlebar Tabs @@ -211,6 +217,8 @@ class TerminalWindow: NSWindow { override func update() { super.update() + guard titlebarTabs else { return } + // This is called when we open, close, switch, and reorder tabs, at which point we determine if the // first tab in the tab bar is selected. If it is, we make the `windowButtonsBackdrop` color the same // as that of the active tab (i.e. the titlebar's background color), otherwise we make it the same