yabai: Apps auto raise when hovering over Dock after unplugging external display

Hello,

I have installed yabai with a minimal setup (to use “focus follow mouse” feature, without auto raise):

yabai -m config focus_follows_mouse autofocus

I’m very satisfied with it, however I noticed, that sometimes (I haven’t figured out real root cause yet) all apps auto raise, but only when I hover over them in Dock. Then I need to restart yabai to fix this. It seems like it has something to do with external display, because if I plug it in, it works ok, but if I unplug, I face this issue. Seems like it’s not replicable everytime I do this tho, but I was not able to reproduce it differently so my guess is that it has something to do with external display un/plugging.

Has anyone experienced this issue? Any idea how to fix it?

Thank you.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 21 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Should be fixed on master.

yeah, I also have this problem every time I start my machine. It disappears after I restart yabai.

I’m also experiencing this issue, really annoying 😦

Well, maybe all of your problems are related to GPU. But my problem just appears randomly. You can never predict when it appears.

Ok, I can reliably reproduce this. For me, the steps to reproduce are:

  • Plug sleeping MacBook Pro into external monitor (via USB-C) w/ the MBP lid closed
  • Wake from sleep
  • Login to MBP
  • Restart yabai - brew services restart yabai
  • Verify no unwanted “click on hover” behavior
  • Open MBP screen
  • Disconnect from external monitor

From here, I consistently experience the “phantom click on hover” behavior until I either restart yabai or unclick the “Automatic graphics switching” option. Re-enabling that graphics switching option reliably brings the unwanted behavior back. Restarting yabai permanently resolves the issue until I go through this same sequence.

I’ve tried this sequence with that option both enabled and disabled at the beginning of the sequence, and it doesn’t seem to impact the final outcome.

@Surimitzu, you’re on to something here. I’m working on my laptop after disconnecting the monitor, and I just hovered over a MacOS menu bar, and the annoying clicks (that we’ve all described here) started happening.

As soon as I started experiencing this, I recalled the update on this issue that I’d seen, and I opened up System Preferences and unclicked the “Automatic graphics switching” option. After that point, hovering over any MacOS UI elements (menu bar items, Dock icons, etc) did not trigger the phantom clicks that are being described here. I can toggle that graphics switching option back on, and I can now reliably trigger the phantom clicks on the MacOS UI elements. Unclicking the option resumes the normal behavior of not experiencing the phantom clicks.

If there’s any more diagnostic info I can capture, I’m happy to collect it, and I’ll see if I can now figure out how to reliably get into this odd state.