mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-01 15:38:35 +00:00
refactor: no need to set from for moveFocus probably
This commit is contained in:
@@ -240,12 +240,7 @@ class BaseTerminalController: NSWindowController,
|
||||
|
||||
// Move focus to the target surface and activate the window/app
|
||||
DispatchQueue.main.async {
|
||||
// We suppress the spurious unfocus signal by passing nil for `from`
|
||||
// when the surface is already the logically focused one.
|
||||
Ghostty.moveFocus(
|
||||
to: view,
|
||||
from: (self.focusedSurface == view) ? nil : self.focusedSurface
|
||||
)
|
||||
Ghostty.moveFocus(to: view)
|
||||
view.window?.makeKeyAndOrderFront(nil)
|
||||
if !NSApp.isActive {
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
|
Reference in New Issue
Block a user