diff --git a/macos/Sources/Ghostty/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/SurfaceView_AppKit.swift index 3c5cd71ef..9b78b868c 100644 --- a/macos/Sources/Ghostty/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_AppKit.swift @@ -480,9 +480,10 @@ extension Ghostty { let pos = self.convert(event.locationInWindow, from: nil) ghostty_surface_mouse_pos(surface, pos.x, frame.height - pos.y) - guard let window = self.window as? TerminalWindow else { return } - if !self.focused && window.focusFollowsMouse { - Ghostty.moveFocus(to: self) + if let window = self.window as? TerminalWindow { + if !self.focused && window.focusFollowsMouse { + Ghostty.moveFocus(to: self) + } } }