mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-01 23:48:35 +00:00
refactor(focusSurface): check app status in advance
This commit is contained in:
@@ -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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user