macOS: follow up cascading fix for #14118 (#14132)

Didn't respect the comment above. Sorry for the back&forth changes 🫪
This commit is contained in:
Mitchell Hashimoto
2026-09-03 08:38:00 -07:00
committed by GitHub

View File

@@ -297,9 +297,11 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
if !window.styleMask.contains(.fullScreen) {
let hasFixedPos = c.derivedConfig.windowPositionX != nil && c.derivedConfig.windowPositionY != nil
// We're dispatching this async because otherwise the lastCascadePoint doesn't
// take effect. Our best theory is there is some next-event-loop-tick logic
// that Cocoa is doing that we need to be after.
Self.applyCascade(to: window, hasFixedPos: hasFixedPos)
// take effect after positioning in `showWindow`. Our best theory is there is
// some next-event-loop-tick logic that Cocoa is doing that we need to be after.
DispatchQueue.main.async {
Self.applyCascade(to: window, hasFixedPos: hasFixedPos)
}
}
}