yabai
yabai copied to clipboard
Unintended mouse clicks on Dock and app menus
I loaded yabai 3.3.7 using homebrew today, primarily for focus follows mouse. Intel MBP running macOS 10.15.7. I have not disabled SIP or installed the scripting addition. The only lines I have changed from defaults in my .yabairc are: yabai -m config focus_follows_mouse autofocus yabai -m config layout float
Things were working fine initially, but I just noticed some odd behavior where it appeared that the mouse was being held down and generating unintended mouse clicks. This did not happen when the mouse was over an application window, the desktop background, or the menu bar. It only seemed to happen when the mouse was over the Dock or an application's menus. If I just dragged the mouse across the Dock (without clicking on anything) the Mac acted as if I was clicking every Dock icon that the mouse passed over. Apps that were not open were launched, and apps that were open were brought to the front. If I went up to the menu bar and clicked a menu title to open that menu, then dragged the mouse down the menu (without clicking) the app behaved as if I was clicking menu items as the mouse passed over them.
I did not realize what was going on for a moment, so I don't know exactly what triggered all this. Restarting yabai with "brew services restart yabai" got everything working normally again.
The behavior I saw sounds somewhat similar to issue #376 but not quite the same. CPU usage did not seem to be a factor in my case as it was quite low at the time.
Does anybody have any suggestions on this? It's happening at least once a day, sometimes 3-4.
I had a similar issue when hiding desktop icons with ˋdefaults write com.apple.finder CreateDesktop falseˋ.
https://youtu.be/HJq_zWAd4T4 https://github.com/koekeishiya/yabai/issues/637#issuecomment-772808456
As I've been using Yabai for a couple of weeks now, I think what I'm actually seeing is similar to or maybe the same as issue #660. It definitely seems to happen after un-docking from my external monitors, which generally also results in a switch from discrete GPU to integrated GPU. The comments in issue 660 seem to indicate this was fixed in 3.3.5 but I'm still seeing it in 3.3.7.
I am running into this too. v3.3.7 on 11.2.3 Big Sur. I can click the dock's Mail App icon to focus to the Mail Window, and if I accidentally move the mouse across the Siri App icon (next to Mail), Siri will start. Doesn't happen all the time, haven't been able to figure out what triggers it, but when it's in this mode moving the mouse across any of the dock App icons will start them all up.
If there is some debugging or other info I can provide please let me know. Otherwise Yabai rocks!
I've given up on yabai. The accidental startup of a bunch of apps every time my mouse pointer travels over the dock is just too annoying.
The only other debugging info I can give is that I did not disable SIP, and I often run a few RealVNC viewers on both my displays (iMac 27 and separate 27" monitor).
I don't know what debugging info would be helpful. I don't know why this issue is happening; I don't have this (have never had this) problem on my MBP. yabai does not simulate mouse-clicks, except for the case covered by the comment above mentioning the (undocumented) setting: defaults write com.apple.finder CreateDesktop false
I think I am seeing the same thing and am working on specific steps to reproduce. For me at least, it seems specifically related to focus-follows-mouse.
I also have this issue. I installed the release version with brew. I set focus_follows_mouse
off and that seemed to resolve it.
I've seen this for a long time too, and still see it on 4.0.0. I'm installing 4.0.1 now; it doesn't look like it would fix it, but it may. I use focus_follows_mouse
.
I only see the problem sporadically, maybe every couple of weeks. Once it hits, it's consistent—mousing over anything on the dock acts like clicking it—until I restart yabai. Then it's gone again until whatever triggers it happens.
Hmm. FWIW, it seems to be happening more frequently now for me on 4.0.1, though that could be a fluke.
Not sure if it helps, but one way that I can reliably reproduce this (with two screens) is to click a dock icon to focus a window on a different display than the dock, and mouse over an adjacent unopened app in the dock. This always creates a false click event for me. (with focus-follows-mouse set to autofocus)
I've had to disable autofocus for the time being.
@danshick Good find. Your process reliably reproduces the problem for me, too. I hope that can help someone find a fix.
Another reproducible way to trigger this I found is by hovering over an application in the dock and using Command-Tab to switch to an application on an adjacent display.
This is still happening form me in v5.0.3
Does disabling SIP workaround this issue?
I was experiencing this due to using defaults write com.apple.finder CreateDesktop false
to hide icons on my desktop.
To fix you can either turn off focus-follows-mouse
or set defaults write com.apple.finder CreateDesktop true
See #637
This issue occurs when I use a USB C dock, and enable MacosInstantView application for USB Video. I also have CreateDesktop false, and it fixes when I make that true. I am using macos 14.2.1, Apple Silicon.
But, in sonoma, this causes issues with the Desktop if CreateDesktop is set to true. It clicks the desktop, causing problems with the Click to show desktop feature. Super frustrating with multi-monitors. Have to disable it in settings, not ideal.
Additionally, if you use sketchybar, it clicks everything and causes my bar to mess up.
Should be fixed on master.
--
For Sketchybar to work, you need to set external_bar
property in your yabai config.
You should not use defaults write com.apple.finder CreateDesktop false
. While the changes to master makes this more compatible, it will still be broken if you use Dock Magnification, and yabai will not be able to correctly change focus to empty spaces. I still stand by my previous comment, that this undocumented option is not something that can be fully supported, because it fundamentally changes how some APIs behave. Just move things away from your desktop and keep it clean instead.
The "click wallpaper to reveal desktop" can be disabled in macOS settings, and this is also mentioned in the readme/wiki caveats. (This setting appears to just do nothing at all if finder CreateDesktop
setting above is set to false).
--
Otherwise just disable focus follows mouse.