Question

I work with two screens. On the primary screen, I have XCode on. On the other screen, I have the browser. While reading docs, I am usually focused on the XCode screen, typing in code.

So I want to close the tab in the other screen, I move my mouse to the 2nd screen and press CMD+W and it closes the XCode window instead because the focus is on that app. Sometimes I don't notice that the focus isn't on the other screen and close the app on the main screen instead. It's pretty annoying.

Is there any way to make the OS focus on the top window of the screen where the mouse pointer is active?

Was it helpful?

Solution

Check Zooom/2 and its Auto Raise feature that "causes the application currently under the mouse point to become the front-most application, after a user-specified delay. It's possible to raise just the window under the mouse or all windows for an application."

http://coderage-software.com/zooom/doc/auto_raise/auto_raise.html

OTHER TIPS

I made a python script that does this. Check it out: https://bitbucket.org/sivann/mac-screenfocus/src

It focuses the last app that had the focus before the mouse left the screen. No mouse clicks happen behind the scene :-)

In my setup, the external monitor is on the left, it may not work in the reverse, let me know..

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top