refactor(focusSurface): check app status in advance

pull/8961/head
himura467 2025-09-29 00:02:43 +09:00
parent 8151f4bbf5
commit 337ecdd0b3
1 changed files with 3 additions and 1 deletions

View File

@ -239,7 +239,9 @@ class BaseTerminalController: NSWindowController,
DispatchQueue.main.async { DispatchQueue.main.async {
Ghostty.moveFocus(to: view, from: self.focusedSurface) Ghostty.moveFocus(to: view, from: self.focusedSurface)
view.window?.makeKeyAndOrderFront(nil) view.window?.makeKeyAndOrderFront(nil)
NSApp.activate(ignoringOtherApps: true) if !NSApp.isActive {
NSApp.activate(ignoringOtherApps: true)
}
} }
} }