minor comment changes

This commit is contained in:
Mitchell Hashimoto
2024-06-18 17:09:29 -04:00
parent 406d494e1d
commit 50019bc766
2 changed files with 15 additions and 10 deletions

View File

@ -480,12 +480,15 @@ extension Ghostty {
let pos = self.convert(event.locationInWindow, from: nil)
ghostty_surface_mouse_pos(surface, pos.x, frame.height - pos.y)
if let window = self.window as? TerminalWindow {
if !self.focused && window.focusFollowsMouse {
// If focus follows mouse is enabled then move focus to this surface.
if let window = self.window as? TerminalWindow,
window.isKeyWindow &&
window.focusFollowsMouse &&
!self.focused
{
Ghostty.moveFocus(to: self)
}
}
}
override func mouseDragged(with event: NSEvent) {
self.mouseMoved(with: event)

View File

@ -421,12 +421,6 @@ command: ?[]const u8 = null,
/// This is primarily useful for scripts or debugging.
@"wait-after-command": bool = false,
// If true, when there are multiple split panes, the mouse selects the pane
// that is focused.
//
// Default is false.
@"focus-follows-mouse": bool = false,
/// The number of milliseconds of runtime below which we consider a process exit
/// to be abnormal. This is used to show an error message when the process exits
/// too quickly.
@ -753,6 +747,14 @@ keybind: Keybinds = .{},
/// This configuration currently only works with GTK.
@"window-new-tab-position": WindowNewTabPosition = .current,
// If true, when there are multiple split panes, the mouse selects the pane
// that is focused. This only applies to the currently focused window; i.e.
// mousing over a split in an unfocused window will now focus that split
// and bring the window to front.
//
// Default is false.
@"focus-follows-mouse": bool = false,
/// When enabled, the full GTK titlebar is displayed instead of your window
/// manager's simple titlebar. The behavior of this option will vary with your
/// window manager.