macos: don't restore tab bar with non-native fs

pull/7588/head
Mitchell Hashimoto 2025-06-13 15:02:05 -07:00
parent ac4b0dcac0
commit 1b6142b271
1 changed files with 6 additions and 0 deletions

View File

@ -268,6 +268,12 @@ class NonNativeFullscreen: FullscreenBase, FullscreenStyle {
// Removing the "titled" style also derefs all our accessory view controllers // Removing the "titled" style also derefs all our accessory view controllers
// so we need to restore those. // so we need to restore those.
for c in savedState.titlebarAccessoryViewControllers { for c in savedState.titlebarAccessoryViewControllers {
// Restoring the tab bar causes all sorts of problems. Its best to just ignore it,
// even though this is kind of a hack.
if let window = window as? TerminalWindow, window.isTabBar(c) {
continue
}
if window.titlebarAccessoryViewControllers.firstIndex(of: c) == nil { if window.titlebarAccessoryViewControllers.firstIndex(of: c) == nil {
window.addTitlebarAccessoryViewController(c) window.addTitlebarAccessoryViewController(c)
} }