no early return

This commit is contained in:
Cameron Dart
2024-06-10 18:23:06 -07:00
parent fc52acd47a
commit 92e16ccbf7

View File

@ -480,11 +480,12 @@ 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 let window = self.window as? TerminalWindow {
if !self.focused && window.focusFollowsMouse {
Ghostty.moveFocus(to: self)
}
}
}
override func mouseDragged(with event: NSEvent) {
self.mouseMoved(with: event)