Can I make all viewable windows active (responsive to mouse clicks)? [duplicate]

I'm a new Mac user, having been issued with a MacBook Pro when I started a new job three months ago. A Windows and Linux user before, I'm now getting quite used to the differences with using Apple's desktop environment.

One thing that is still slowing me down a little is the requirement to explicitly click in an application window to make it active, before the UI elements inside that window can be interacted with.

For example, if I have two browser windows open side by side with the left one active, it takes two clicks to follow a link in the right hand window: one to make the window active, one to click the link.

This is in contrast to Windows or Linux, where you can click on a UI element in a inactive window and that single click will both activate the window and the element in it.

A similar issue is trying to copy and paste text between windows. I can select and copy text in an active terminal or editor, then paste it into another with 'right-click, Paste' but that doesn't activate the window. I still need to left-click the window to activate it before I can type into it.

In Windows and Linux, the right-click to paste would also activate the window. If I was pasting a command into a terminal, I could then just hit Enter to run it, whereas an extra mouse click is required on my Mac. This feels a little cumbersome.

Can this behaviour be adjusted to resemble Windows and Linux?


Solution 1:

The answer, in general, is "no". There are some exceptions/workarounds though, for example:

  • You can click through to any control in an unfocused window using Cmd-Click. This will directly operate that control without focusing the window, which might save you a click in your side-by-side browser window scenario. Unfortunately it's up to each application developer to make this work sensibly, and some unfocused applications will still perform any special action assigned to Cmd-Click, rather than treating it as a simple click.
  • In Terminal.app, Cmd-Right Click will paste the contents of the primary selection (the last text you highlighted in any terminal window) into the same or another terminal, whether that terminal is focused or not.
  • Specifically for X11 applications running under XQuartz.app (which isn't very many these days), you can specify the "focus follow mouse" option so that X11 windows are focused as you mouse over them. (There also used be a hidden focus-follows-mouse option for Terminal.app windows, don't know if it still works in El Capitan or Sierra.)

Solution 2:

I know this is kind of an old thread but for anybody still looking, I found a great tool called yabai.

Here is the GitHub link: https://github.com/koekeishiya/yabai

You can set it up so focus-follows-mouse is the default system behavior and you will get what you're looking for. I was frustrated with this too, coming from Windows. However, I've been using this for the past 3 months and honestly I'd go crazy without it now. Highly recommend it.

brew install koekeishiya/formulae/yabai
brew services start yabai
yabai -m config focus_follows_mouse autofocus

Installing the yabai scripting addition or disabling system integrity protection was not necessary to make this work on an M1 mac.