From d4a5ff58b6bc4a1fcc79a69f5cff94a678d97f42 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Tue, 1 Sep 2026 16:56:28 +0200 Subject: [PATCH] macOS: fix window cascading --- macos/Sources/Features/Terminal/TerminalController.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index 5e556afea..919ebb4ff 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -283,12 +283,14 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr } } + // We moved out showWindow again because it involves positioning and we need to + // apply the cascading in the next event loop tick after the position changes. + // This is still our guess, but at least it's working so far. + c.showWindowSafely(self) // 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. c.scheduleInitialPresentation { - c.showWindow(self) - // Only cascade if we aren't fullscreen. if let window = c.window { if !window.styleMask.contains(.fullScreen) { @@ -353,6 +355,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr c.isBackgroundOpaque = inheritBackgroundOpacity } + c.showWindowSafely(self) c.scheduleInitialPresentation { c.showWindow(self) if let window = c.window {