fix: the renderer's cursor remains in an unfocused state (block_hollow)

This commit is contained in:
himura467
2025-09-30 05:21:56 +09:00
parent a6dd7bbeee
commit bc3d0b7cbc

View File

@@ -240,7 +240,12 @@ class BaseTerminalController: NSWindowController,
// Move focus to the target surface and activate the window/app
DispatchQueue.main.async {
Ghostty.moveFocus(to: view, from: self.focusedSurface)
// 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
)
view.window?.makeKeyAndOrderFront(nil)
if !NSApp.isActive {
NSApp.activate(ignoringOtherApps: true)