macOS: fix window sizing after dragging a split into a window (#13682)

Regression from
[#13601](https://github.com/ghostty-org/ghostty/issues/13601), but I
don't see why it matters. But the surface's bounds changes after
window's created.
This commit is contained in:
Mitchell Hashimoto
2026-08-07 07:38:48 -07:00
committed by GitHub

View File

@@ -344,14 +344,15 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
confirmUndo: Bool = true,
inheritBackgroundOpacity: Bool? = nil
) -> TerminalController {
// Calculate the target frame based on the tree's view bounds
// before moving into the new window
let treeSize: CGSize? = tree.root?.viewBounds()
let c = TerminalController.init(ghostty, withSurfaceTree: tree)
if let inheritBackgroundOpacity {
c.isBackgroundOpaque = inheritBackgroundOpacity
}
// Calculate the target frame based on the tree's view bounds
let treeSize: CGSize? = tree.root?.viewBounds()
c.scheduleInitialPresentation {
c.showWindow(self)
if let window = c.window {