37

"Focus follows mouse" or "sloppy focus" is a feature common to X11 window managers on Linux/Unix, including GNOME, KDE, CDE, XFCE and window managers like Enlightenment, Fluxbox and Window Maker. It is also available via TweakUI on Windows. Some individual applications on OS X, like iTerm support it.

What is it? Simply put, the window where the mouse pointer is has focus, rather than having to click a window for it to gain focus.

Does the native GUI for OS X support this, with some hidden setting?

DavidPostill
  • 162,382
jtimberman
  • 21,887

7 Answers7

20

The standard Terminal application included in Mac OS X will do focus-follows-mouse (within that application only, and no auto-raise) if you run this command from a shell and then restart the Terminal app:

% defaults write com.apple.Terminal FocusFollowsMouse -boolean YES
11

The fundamental problem with sloppy focus on the Mac is that the menu bar is always associated with the currently focused application; if you had sloppy focus, accessing the menu bar for a specific application would be supremely difficult.

Having said that, Zooom/2 does what you want, in addition to providing equivalents to the open-source window manager features for ctrl+click moving & resizing of windows.

8

@Drew

The fundamental problem with sloppy focus on the Mac is that the menu bar is always associated with the currently focused application; if you had sloppy focus, accessing the menu bar for a specific application would be supremely difficult.

The menu bar wouldn't have to be changed though, just like you wouldn't have to enable auto-raise.

Having said that, Zooom/2 does what you want ...

But as was mentioned in the comments: not without auto-raise, which just makes it unusable. Another caveat is that it activates Finder whenever you move the mouse over the desktop, so you'll pretty much have to add Finder to the ignore list. Both of these issues apply for MondoMouse too.

It wasn't mentioned here yet, but OS X has click-through — if you hold , it's possible to click most items in background windows.

Lri
  • 42,502
  • 8
  • 126
  • 159
7

Steve Yegge over at his blog claims that focus follow mouse with no autoraise isn't going to happen on OS X anytime soon:

http://steve-yegge.blogspot.com/2008/04/settling-osx-focus-follows-mouse-debate.html

Since ALL OS X utilities out there that promise "focus follows mouse" do autoraise, I think Steve Yegge is sadly right.

andz
  • 221
5

It should be noted that Leopard introduced "Scrolling Focus Follows Mouse," where you can scroll via the mouse scroll wheel or a trackpad gesture on any window that the mouse is over.

Except, of course, Microsoft Word for Mac.

This is a great feature that, while not full Focus-Follows-Mouse, proves that some aspects of it can be done in OS X.

ck_
  • 363
3

There should be no problem with doing focus-follows-mouse without autoraise across all applications, as the Terminal example and command-click prove, but you'd need to inject code into running applications via mach_inject or similar. You'd essentially write an "input manager" that redirects the keystrokes/clicks any time the mouse enters a textbox/button. Any click that doesn't hit a button raises the window. And command-click only raises the window.

Jeff Burdges
  • 201
  • 1
  • 6
1

The free, open-source Amethyst Mac app is an alternative to Zooom and Mondomouse (Whose links above seem to be broken).

You can download Amethyst here: https://github.com/ianyh/Amethyst