Amethyst: What's needed for focus follows mouse?

Created on 26 Jan 2017  路  6Comments  路  Source: ianyh/Amethyst

I realize that this feature is experimental, but I cannot get it to work at all. The only preferences I have changed from default is to remove all layouts except floating, and enable focus follows mouse. Is there some other dependency I am missing here?

I guess it might not work for certain apps, but it has not worked for the ones I have tried, which are terminal, realvnc, and safari.

Trello Card

bug

Most helpful comment

@ianyh I ran into what could be the same problem a long time ago, when I did focus-follows-mouse, see issue for reference.

Having the Dock visible made focus-follows-mouse not work on the display that showed the Dock.

In short, having the Dock always visible caused the window-server to always report an (invisible ?) window in the first index, with the same size as the primary display resolution. The window has kCGWindowOwnerName set to Dock and kCGWindowName set to Dock, and I used that information to simply ignore it.

All 6 comments

It should definitely work for those apps. I just tried it, though, and it is definitely behaving erratically. Do you have any external displays? Does it work with any layouts besides floating?

It is not working with any of those apps on just my primary display (macbook pro early 2015). Though also today I've hooked up two external monitors, but no difference.

However, I've switched from realvnc to Mac ScreenSharing, and it does sort of work among the different windows of that app (though not reliably -- e.g., it will change the focus when moving from window A to B, but not from B to A). So at least I'm on the write path in the config. Though also, still not from ScreenSharing to any other app.

Using tall layout doesn't change the situation.

Maybe unrelated issue (not sure), but definitely similar to #398 (MacBook Pro late 2016, macOS 10.12.3 (16D32), two monitors, was trying tall and floating). The feature doesn't work on monitor 1 for me at all, but works perfectly on monitor 2 (including moving the mouse from monitor 1 to monitor 2; moving it back to monitor 1 or any movement on monitor 1 yields no focus change).

That feature would be totally awesome (being used to *nix). Sad, Macs don't have it, so if you have any clues how to make it work, that would be really much appreciated! Thanks a lot in advance!

@ianyh I ran into what could be the same problem a long time ago, when I did focus-follows-mouse, see issue for reference.

Having the Dock visible made focus-follows-mouse not work on the display that showed the Dock.

In short, having the Dock always visible caused the window-server to always report an (invisible ?) window in the first index, with the same size as the primary display resolution. The window has kCGWindowOwnerName set to Dock and kCGWindowName set to Dock, and I used that information to simply ignore it.

@koekeishiya Thank you so much! I would have spent ages trying to track that down.

Yes, I came to the same conclusion when thinking about the differences between the "monitors". After switching to show/hide dock it started to work for me also on monitor 1 (with the now usually hidden dock). Thank you @koekeishiya for even posting a possible solution.

@ianyh If I may, is it possible on macOS (I am new to it) to implement the feature also without auto-raise? Coming from Unix environments, I always used focus-follows-mouse, but never auto-raise as this is often breaking certain interactions with new windows/dialogs that pop up over a window your mouse happens to be over. Being able to selectively enable or disable auto-raise would be really awesome therefore, I believe.

Was this page helpful?
0 / 5 - 0 ratings