Skip to content

focus-follows-mouse should follow windows too #5423

@mitchellh

Description

@mitchellh

Discussed in #5383

Originally posted by edrozenberg January 26, 2025
Currently focus-follows-mouse only works for focusing different splits within a single window/tab.

ghostty.org/docs/config/reference#focus-follows-mouse

For some use-cases it would be nice to be able to set focus-follows-mouse to also work between Ghostty windows, for ex. a window on the left and a window on the right.

Maybe something like:
focus-follows-mouse = < splits | windows | all | false >

There are some Mac utilities that might enable window-based focus follow for all apps, but I'd want to enable it specifically for Ghostty.

For reference, Mac's Terminal.app currently provides window-based focus follow:
defaults write com.apple.Terminal FocusFollowsMouse -bool YES

My Q is specifically about Mac but may apply to Linux also. I'm aware Linux has long had the option to enable global focus follows mouse between windows. I don't know if it's possible to control this at the app level on Linux, not educated well enough on this topic on Linux OS's.

Mitchell's Notes

I like the proposal here, I think changing it to a packed struct would yield all of these options. I think true should by default turn them all on (which you'll get for free with a packed struct).

As noted in the discussion, I'm not sure if this is even possible with GTK but if not we should just document it as a limitation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    guiGUI or app issue regardless of platform (i.e. Swift, GTK)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions