diff options
| author | himura467 <mitarashidango0927@gmail.com> | 2025-09-30 05:58:21 +0900 |
|---|---|---|
| committer | himura467 <mitarashidango0927@gmail.com> | 2025-09-30 05:58:21 +0900 |
| commit | b3d0b6a965575da7efecea02f6478136630dee6e (patch) | |
| tree | 1d3047dd9e075c374ec84450c154050411ede6a8 /macos | |
| parent | bc3d0b7cbc2ff4343243eaed55656eb1a1555ea5 (diff) | |
refactor: no need to set from for moveFocus probably
Diffstat (limited to 'macos')
| -rw-r--r-- | macos/Sources/Features/QuickTerminal/QuickTerminalController.swift | 2 | ||||
| -rw-r--r-- | macos/Sources/Features/Terminal/BaseTerminalController.swift | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift b/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift index 17650b5c6..eaefbf55b 100644 --- a/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift +++ b/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift @@ -257,7 +257,7 @@ class QuickTerminalController: BaseTerminalController { guard surfaceTree.contains(view) else { return } // Set the target surface as focused before animation DispatchQueue.main.async { - Ghostty.moveFocus(to: view, from: self.focusedSurface) + Ghostty.moveFocus(to: view) } // Animation completion handler will handle window/app activation animateIn() diff --git a/macos/Sources/Features/Terminal/BaseTerminalController.swift b/macos/Sources/Features/Terminal/BaseTerminalController.swift index 4298dd1e6..a34be4125 100644 --- a/macos/Sources/Features/Terminal/BaseTerminalController.swift +++ b/macos/Sources/Features/Terminal/BaseTerminalController.swift @@ -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) |
