Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions GhosttyTabs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@
A500120D /* UpdateLogStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001223 /* UpdateLogStore.swift */; };
A5001207 /* UpdatePopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001217 /* UpdatePopoverView.swift */; };
A5001208 /* UpdateTitlebarAccessory.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001218 /* UpdateTitlebarAccessory.swift */; };
A5001240 /* WindowDecorationsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001241 /* WindowDecorationsController.swift */; };
A5001610 /* SessionPersistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001611 /* SessionPersistence.swift */; };
A5001640 /* RemoteRelayZshBootstrap.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001641 /* RemoteRelayZshBootstrap.swift */; };
A5001650 /* ProgramaConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001651 /* ProgramaConfig.swift */; };
Expand Down Expand Up @@ -653,7 +652,6 @@
A5001218 /* UpdateTitlebarAccessory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Update/UpdateTitlebarAccessory.swift; sourceTree = "<group>"; };
A5001222 /* WindowAccessor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowAccessor.swift; sourceTree = "<group>"; };
A5001223 /* UpdateLogStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Update/UpdateLogStore.swift; sourceTree = "<group>"; };
A5001241 /* WindowDecorationsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowDecorationsController.swift; sourceTree = "<group>"; };
A5001611 /* SessionPersistence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionPersistence.swift; sourceTree = "<group>"; };
A5001651 /* ProgramaConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramaConfig.swift; sourceTree = "<group>"; };
A5001653 /* ProgramaConfigExecutor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramaConfigExecutor.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1107,7 +1105,6 @@
A5001223 /* UpdateLogStore.swift */,
A5001217 /* UpdatePopoverView.swift */,
A5001218 /* UpdateTitlebarAccessory.swift */,
A5001241 /* WindowDecorationsController.swift */,
A5001222 /* WindowAccessor.swift */,
A5001611 /* SessionPersistence.swift */,
A5001641 /* RemoteRelayZshBootstrap.swift */,
Expand Down Expand Up @@ -1675,7 +1672,6 @@
A500120D /* UpdateLogStore.swift in Sources */,
A5001207 /* UpdatePopoverView.swift in Sources */,
A5001208 /* UpdateTitlebarAccessory.swift in Sources */,
A5001240 /* WindowDecorationsController.swift in Sources */,
A500120C /* WindowAccessor.swift in Sources */,
A5001610 /* SessionPersistence.swift in Sources */,
A5001640 /* RemoteRelayZshBootstrap.swift in Sources */,
Expand Down
11 changes: 0 additions & 11 deletions Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate, @preconcurrency UNUser
private var browserAddressBarBlurObserver: NSObjectProtocol?
private let updateController = UpdateController()
private lazy var titlebarAccessoryController = UpdateTitlebarAccessoryController(viewModel: updateViewModel)
private let windowDecorationsController = WindowDecorationsController()
private var menuBarExtraController: MenuBarExtraController?
private static let serviceErrorNoPath = NSString(string: String(localized: "error.clipboardFolderPath", defaultValue: "Could not load any folder path from the clipboard."))
private static let didInstallWindowKeyEquivalentSwizzle: Void = {
Expand Down Expand Up @@ -1170,10 +1169,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate, @preconcurrency UNUser
updateController.startUpdaterIfNeeded()
}
titlebarAccessoryController.start()
windowDecorationsController.isMainTerminalWindow = { [weak self] window in
self?.isMainTerminalWindow(window) ?? false
}
windowDecorationsController.start()
installMainWindowKeyObserver()
refreshGhosttyGotoSplitShortcuts()
installGhosttyConfigObserver()
Expand Down Expand Up @@ -4968,7 +4963,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate, @preconcurrency UNUser

// Apply shared window styling.
attachUpdateAccessory(to: window)
applyWindowDecorations(to: window)

// Keep a strong reference so the window isn't deallocated.
let controller = MainWindowController(window: window)
Expand Down Expand Up @@ -5696,10 +5690,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate, @preconcurrency UNUser
titlebarAccessoryController.attach(to: window)
}

func applyWindowDecorations(to window: NSWindow) {
windowDecorationsController.apply(to: window)
}

func toggleNotificationsPopover(animated: Bool = true, anchorView: NSView? = nil) {
titlebarAccessoryController.toggleNotificationsPopover(animated: animated, anchorView: anchorView)
}
Expand Down Expand Up @@ -9291,7 +9281,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate, @preconcurrency UNUser
WindowGlassEffect.remove(from: window)
}
AppDelegate.shared?.attachUpdateAccessory(to: window)
AppDelegate.shared?.applyWindowDecorations(to: window)
AppDelegate.shared?.registerMainWindow(
window,
windowId: windowId,
Expand Down
10 changes: 0 additions & 10 deletions Sources/DebugWindows.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ final class SettingsAboutTitlebarDebugWindowController: NSWindowController, NSWi
window.identifier = NSUserInterfaceItemIdentifier("programa.settingsAboutTitlebarDebug")
window.center()
window.contentView = NSHostingView(rootView: SettingsAboutTitlebarDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -259,7 +258,6 @@ final class DebugWindowControlsWindowController: NSWindowController, NSWindowDel
window.identifier = NSUserInterfaceItemIdentifier("programa.debugWindowControls")
window.center()
window.contentView = NSHostingView(rootView: DebugWindowControlsView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -575,7 +573,6 @@ final class BrowserProfilePopoverDebugWindowController: NSWindowController, NSWi
window.identifier = NSUserInterfaceItemIdentifier("programa.browserProfilePopoverDebug")
window.center()
window.contentView = NSHostingView(rootView: BrowserProfilePopoverDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -771,7 +768,6 @@ final class SidebarDebugWindowController: NSWindowController, NSWindowDelegate {
window.identifier = NSUserInterfaceItemIdentifier("programa.sidebarDebug")
window.center()
window.contentView = NSHostingView(rootView: SidebarDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -1100,7 +1096,6 @@ final class MenuBarExtraDebugWindowController: NSWindowController, NSWindowDeleg
window.identifier = NSUserInterfaceItemIdentifier("programa.menubarDebug")
window.center()
window.contentView = NSHostingView(rootView: MenuBarExtraDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -1273,7 +1268,6 @@ final class BrowserToolbarGlassDebugWindowController: NSWindowController, NSWind
window.identifier = NSUserInterfaceItemIdentifier("programa.browserToolbarGlassDebug")
window.center()
window.contentView = NSHostingView(rootView: BrowserToolbarGlassDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -1348,7 +1342,6 @@ final class OverlayGlassDebugWindowController: NSWindowController, NSWindowDeleg
window.identifier = NSUserInterfaceItemIdentifier("programa.overlayGlassDebug")
window.center()
window.contentView = NSHostingView(rootView: OverlayGlassDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -1423,7 +1416,6 @@ final class TabBarGlassDebugWindowController: NSWindowController, NSWindowDelega
window.identifier = NSUserInterfaceItemIdentifier("programa.tabBarGlassDebug")
window.center()
window.contentView = NSHostingView(rootView: TabBarGlassDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -1501,7 +1493,6 @@ final class SplitButtonLayoutDebugWindowController: NSWindowController, NSWindow
window.identifier = NSUserInterfaceItemIdentifier("programa.splitButtonLayoutDebug")
window.center()
window.contentView = NSHostingView(rootView: SplitButtonLayoutDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -1571,7 +1562,6 @@ final class BackgroundDebugWindowController: NSWindowController, NSWindowDelegat
window.identifier = NSUserInterfaceItemIdentifier("programa.backgroundDebug")
window.center()
window.contentView = NSHostingView(rootView: BackgroundDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down
3 changes: 0 additions & 3 deletions Sources/ProgramaApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,6 @@ final class SettingsAboutTitlebarStyleStore: ObservableObject {
window.contentMinSize = kind.minimumSize
window.contentMaxSize = maxSize
window.invalidateShadow()
AppDelegate.shared?.applyWindowDecorations(to: window)
}

private func ensureToolbar(on window: NSWindow, kind: SettingsAboutWindowKind) {
Expand Down Expand Up @@ -1452,7 +1451,6 @@ private final class AboutWindowController: NSWindowController, NSWindowDelegate
window.center()
window.contentView = NSHostingView(rootView: AboutPanelView())
SettingsAboutTitlebarStyleStore.shared.applyCurrentOptions(to: window, for: .about)
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down Expand Up @@ -1552,7 +1550,6 @@ final class SettingsWindowController: NSWindowController, NSWindowDelegate {
window.center()
window.contentView = NSHostingView(rootView: SettingsRootView())
SettingsAboutTitlebarStyleStore.shared.applyCurrentOptions(to: window, for: .settings)
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}
Expand Down
1 change: 0 additions & 1 deletion Sources/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,6 @@ struct SettingsRootView: View {
guard identifier.hasPrefix("cmux.") else { continue }
window.removeTitlebarAccessoryViewController(at: index)
}
AppDelegate.shared?.applyWindowDecorations(to: window)
}

private func applyCurrentSettingsWindowStyle(to window: NSWindow) {
Expand Down
1 change: 1 addition & 0 deletions Sources/SidebarShortcutHints.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct ShortcutHintPill<Content: View>: View {
tintColor: nil,
cornerRadius: 100
)
.fixedSize(horizontal: true, vertical: true)
} else {
content
.background(ShortcutHintPillBackground(emphasis: emphasis))
Expand Down
4 changes: 2 additions & 2 deletions Sources/VerticalTabsSidebar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ struct VerticalTabsSidebar: View {
HiddenTitlebarSidebarControlsView(notificationStore: notificationStore)
}
.frame(height: trafficLightPadding)
// Flush sidebar (no panel inset): keep the header content on the
// 25pt traffic-light midline the decorations controller targets.
// Flush sidebar (no panel inset): keep the header aligned with
// AppKit's native titlebar controls.
.padding(.top, usesBackdropSidebar ? WindowGlassEffect.sidebarPanelInset : 0)
.contentShape(Rectangle())
.background(
Expand Down
144 changes: 0 additions & 144 deletions Sources/WindowDecorationsController.swift

This file was deleted.

Loading
Loading