HACK: add focus-follows-mouse

This commit is contained in:
Danny Lin
2024-06-06 23:19:39 -07:00
parent 54ccefe838
commit f97d15ee12

View File

@ -514,6 +514,9 @@ extension Ghostty {
let pos = self.convert(event.locationInWindow, from: nil) let pos = self.convert(event.locationInWindow, from: nil)
ghostty_surface_mouse_pos(surface, pos.x, frame.height - pos.y) ghostty_surface_mouse_pos(surface, pos.x, frame.height - pos.y)
if !self.focused {
Ghostty.moveFocus(to: self)
}
} }
override func mouseDragged(with event: NSEvent) { override func mouseDragged(with event: NSEvent) {