macos: increase window-width/height apply delay from 10ms to 40ms (#11265)

Band-aid for #10304

We don't have a robust fix yet but this should help mitigate more
scenarios.
This commit is contained in:
Mitchell Hashimoto
2026-03-09 08:43:59 -07:00
committed by GitHub

View File

@@ -1052,7 +1052,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
case .contentIntrinsicSize:
// Content intrinsic size requires a short delay so that AppKit
// can layout our SwiftUI views.
DispatchQueue.main.asyncAfter(deadline: .now() + .microseconds(10_000)) { [weak self, weak window] in
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(40)) { [weak self, weak window] in
guard let self, let window else { return }
defaultSize.apply(to: window)
if let screen = window.screen ?? NSScreen.main {