macos: increase window-width/height apply delay from 10ms to 40ms

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:42:05 -07:00
parent dd3d72c3de
commit a6ee1fb292

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 {