From 08107d342a1404ea095e48b0ee7fcc5299c2024f Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Thu, 12 Mar 2026 13:44:34 +0100 Subject: [PATCH] macOS: we don't need initialFrame anymore --- .../Features/Terminal/TerminalController.swift | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index f29e19384..5101651b4 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -56,9 +56,6 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr /// The notification cancellable for focused surface property changes. private var surfaceAppearanceCancellables: Set = [] - /// This will be set to the initial frame of the window from the xib on load. - private var initialFrame: NSRect? - init(_ ghostty: Ghostty.App, withBaseConfig base: Ghostty.SurfaceConfiguration? = nil, withSurfaceTree tree: SplitTree? = nil, @@ -1061,13 +1058,6 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr } } - - // Store our initial frame so we can know our default later. This MUST - // be after the defaultSize call above so that we don't re-apply our frame. - // Note: we probably want to set this on the first frame change or something - // so it respects cascade. - initialFrame = window.frame - // In various situations, macOS automatically tabs new windows. Ghostty handles // its own tabbing so we DONT want this behavior. This detects this scenario and undoes // it. @@ -1666,9 +1656,6 @@ extension TerminalController { // Initial size as requested by the configuration (e.g. `window-width`) // takes next priority. return .contentIntrinsicSize - } else if let initialFrame { - // The initial frame we had when we started otherwise. - return .frame(initialFrame) } else { return nil }