mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-03 00:18:35 +00:00
docs(BaseTerminalController)
This commit is contained in:
@@ -233,9 +233,12 @@ class BaseTerminalController: NSWindowController,
|
|||||||
return newView
|
return newView
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Move focus to a surface view.
|
||||||
func focusSurface(_ view: Ghostty.SurfaceView) {
|
func focusSurface(_ view: Ghostty.SurfaceView) {
|
||||||
|
// Check if target surface is in our tree
|
||||||
guard surfaceTree.contains(view) else { return }
|
guard surfaceTree.contains(view) else { return }
|
||||||
|
|
||||||
|
// Move focus to the target surface and activate the window/app
|
||||||
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)
|
||||||
|
Reference in New Issue
Block a user