mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-02 07:58:37 +00:00
refactor(focusSurface): check app status in advance
This commit is contained in:
@@ -239,9 +239,11 @@ 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)
|
||||||
|
if !NSApp.isActive {
|
||||||
NSApp.activate(ignoringOtherApps: true)
|
NSApp.activate(ignoringOtherApps: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Called when the surfaceTree variable changed.
|
/// Called when the surfaceTree variable changed.
|
||||||
///
|
///
|
||||||
|
Reference in New Issue
Block a user