macOS: fix window cascading for 3rd+ window

This commit is contained in:
Lukas
2026-03-12 18:25:20 +01:00
parent 77c2acf843
commit ea262cdd34

View File

@@ -256,6 +256,8 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
// take effect. 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 {
c.showWindow(self)
// Only cascade if we aren't fullscreen.
if let window = c.window {
if !window.styleMask.contains(.fullScreen) {
@@ -264,8 +266,6 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
}
}
c.showWindow(self)
// All new_window actions force our app to be active, so that the new
// window is focused and visible.
NSApp.activate(ignoringOtherApps: true)