macOS: fix window cascading for 3rd+ window

pull/11426/head
Lukas 2026-03-12 18:25:20 +01:00
parent 77c2acf843
commit ea262cdd34
No known key found for this signature in database
GPG Key ID: 1944A0A77B561220
1 changed files with 2 additions and 2 deletions

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)