106

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?

7
  • 1
    This feature in macOS is called click-through and it's enabled by default, I can't find any switch to fix it, but start searching for this keyword. If i have anything new I will be back with an answer! Jan 20, 2017 at 11:52
  • 12
    have there been any developments on this? It's still my biggest frustration with macOS.
    – Jonah
    Jan 4, 2019 at 13:25
  • 4
    google brought me here... new macOS user, it's driving me up the wall!
    – m1nkeh
    Apr 19, 2019 at 19:16
  • 1
    +1 another scenario for VSCode: try to create a "New File" on an inactive VSCode editor. It'll be created. Then try to type a file name. You cannot. Because the editor still is unfocused. That makes me crazy.
    – user375115
    Jan 26, 2021 at 5:35
  • 3
    Just a semi sarcastic rant - but the non-activated window strangely response to mouse wheel scroll, SMH...
    – fung
    Apr 25, 2021 at 5:19

3 Answers 3

44

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.)
6
  • 2
    Nice to know about the exceptions/workarounds. +1 Jan 20, 2017 at 17:09
  • 1
    Terminal focus follows mouse is still there. Mar 4, 2018 at 9:56
  • 2
    That mouse follow is still there in High Sierra - in case the link dies, it is defaults write com.apple.Terminal FocusFollowsMouse -string YES and a NO turns it off.
    – nycynik
    Oct 10, 2018 at 17:39
  • Firefox also accepts clicks in inactive windows, but only on its chrome, not the websites it shows.
    – kslstn
    Jun 25, 2019 at 14:08
  • It seems that this answer is now outdated (finally). The solution provided from @benyamynbrkyc appears to works nicely!
    – LyK
    Jan 14, 2022 at 15:54
32

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.

8
  • 1
    Not a comprehensive solution though. If a background window was fullscreen by moving the mouse on it current window will fall behind and hidden behind the fullscreen one
    – Mahdi-Malv
    Feb 8, 2022 at 19:43
  • 2
    Thanks, this is exactly what I was looking for... now on to pasting selected text with the middle mouse button :-D
    – Daniël
    Apr 20, 2022 at 11:22
  • 1
    I just tested it. It work perfectly as expected.
    – Asme Just
    Oct 8, 2022 at 23:55
  • 1
    While this does work - it also comes with a whole bunch of side effects. Menus on other screens opening when hovered rather than clicked. Titled windows coming to the front when hovered. Dock items opening their windows. Unfortunately the experience here ends up being worse. As a new mac user too, I'm amazed how many things along these lines are different, and frustrating.
    – Novocaine
    Dec 16, 2022 at 15:30
  • 1
    Run yabai --start-service instead if you run into "Error: Formula yabai has not implemented #plist, #service or installed a locatable service file"
    – Huan
    Nov 4 at 22:01
0

On Windows and Linux, quite everything which is relevant to a window, to its underlying application, is enclosed within the subject window. Prime example: the menu bar, which is in the window. On macOS, the active window finds its menu bar on top of the screen, not in the window (except a few old oddities), an active process could possibly impact or be acknowledged outside its representative window.

Thus I doubt the required switch is implemented in the user interface of MacOS or that it can be used in the underlying unix layer. I further doubt that implementing it would be feasible as long as the screen-top menu belongs to the active process. Just my 2c.

2
  • There is no need for the asker to clarify his question. During over 20 years using macs (even when macOS was not founded on an unix layer) I have never heard that what is required could be feasible in the mac user interface. Now proving the non-existence of something is kind of hard. Now, in Terminal.app (unix), I do not know the answer in view of the fact unix permits to do what the asker requires. Jan 21, 2017 at 13:52
  • 1
    This does not happen when you click from certain native mac OS apps to the other. For example, clicking from mail to messages doesn't make you click twice to interact with the app UI.
    – Zeke
    Mar 4, 2018 at 2:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .