Quite often as I'm browsing webpages, I'll notice that when I click something, the mouse up event doesn't appear to register, and the click will fail to register. And even though I don't have the mouse button held down, as I move the cursor around, it'll appear as if I'm dragging the cursor with the button held (so I end up highlighting a bunch of text, etc.).
I've managed to isolate the issue to Yabai: it only appears when I have the yabai service turned on, and disappears as soon as I turn it off. I'm not sure how else to measure the event when it occurs, or reproduce it reliably – though it does happen quite often when Yabai is on.
I installed Yabai simply using brew install yabai, and haven't turned off SIP (I'd prefer to keep it on for security reasons). I'm on macOS 10.14.6 (though preparing to upgrade to Catalina soon).
Glad to see I'm not the only one…I experience this all the time! When I click between Firefox tabs, for instance, the click often won't "release" and I'll end up inadvertently dragging the tab across the screen and creating a new browser window. Here are the mouse-related lines from my .yabairc:
yabai -m config focus_follows_mouse off
yabai -m config mouse_follows_focus off
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
You can view my full config here. I was running version 2.1.3 until today—just updated to 2.2.2. I'll report back if I continue to experience this issue.
for reference, my mouse settings were the same as @noperator --- this is the default setting. recently, i commented out mouse_modifer and mouse_action2 --- not sure if that fixed it or not, will report back if I experience more problems.
Update: it happened again, even with the following settings:
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse off
# yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
# yabai -m config mouse_action2 resize
I also noticed this behavior.. It would be great if this could be fixed.
I'll play around a bit with the config and see if it makes any difference.
I don't think it really matters, but my config looks like this
yabai -m config mouse_modifier alt
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
The only difference is the mouse_modifier key - alt is the "Option" key on a Mac, or Super key on a standard keyboard. I use this key to move and resize windows (and perform other WM related actions) on Linux. It's really nice to have parity behavior on macOS.
EDIT:
I'm on macOS 10.15.2 Catalina, with SIP (partially) disabled.
I'm unable to reproduce this issue (tested with Chrome in particular).
I still regularly experience this issue. It tends to happen when my CPU is heavily utilized—e.g., during a Teams/Slack video call. I notice other symptoms at the same time, like mouse clicks not registering at _all_, or windows not snapping into position (or even not being recognized by yabai, so they're effectively treated as floating windows).
Just installed yabai yesterday for the first time and I've been getting this too.
yabai -m config mouse_follows_focus off
yabai -m config focus_follows_mouse autofocus
yabai -m config window_placement second_child
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
I still regularly experience this issue. It tends to happen when my CPU is heavily utilized
Could be. I had two things running at 100% cpu utilisation. (And I have no idea why... one of them was zsh with something about skhd in the "Open Files and Ports" window, but killing it didn't kill skhd itself. Probably unrelated.)
@noperator +1 for heavy CPU usage. I observe this most often when interacting with Google Chrome, especially when creating spikes in CPU usage by opening tabs in the background.
I tried putting my OS under load with stress with various configurations but was unable to reproduce the dragging issue with the text in my terminal emulator (kitty) – I had another window with htop open to ensure that CPU load was indeed being brought to 100% on all logical cores. That being said, my laptop actually remained fairly responsive despite being under heavy stress, which to me raises questions about what the hell Chrome is doing more than anything else.
@koekeishiya the problem seems to be exasperated by my poor habit of having too many tabs open, often with graphics-heavy content.
Made some change on master regarding mouse tracking, but I don't think it will matter.
I think this problem is outside of my control - it appears that either macOS or the application in question drop events under heavy load when a third party tool has subscribed to event notifications.
yabai is not doing anything questionable here - it is simply subscribing to mouse-events using the Quartz Event Services API: https://developer.apple.com/documentation/coregraphics/quartz_event_services?language=objc
Edit: Changes are a part of v2.2.3 as well, but yeah, don't really think they matter.
Same here! My yabai is the latest (2.3.0). I am experiencing this issue when I deal with the tabs in Google Chrome. I tried to open a new tab by pressing "+" button, and then quickly move the mouse pointer to the "x" button of its previous tab to close that previous tab. I could see that the reaction was very sluggish. For example, the button became shaded even when I moved the mouse pointer out of the button; And also, the tab was closed seconds later after I clicked the "x" button.
This issue happens on handling the tabs no matter how many tabs I have created.
My macOS is 10.15.3. Thanks!
Edit: @koekeishiya Is it possible to fix this? Thank you.
I was having the same issues described here, sometimes even clicking on a link on a webpage would not register and I'd be left with it dragging.
As I'm not using any of the mouse-related yabai features, I ended up just returning EVENT_SUCCESS from all the mouse EVENT_CALLBACKs in event.c and haven't had that issue happen since. Overall, clicking on things seems more responsive now.
Should be resolved on master. Please verify.
Just installed yabai from HEAD and noticed an immediate difference. I can't tell you how much of a relief it is not to be unintentionally dragging windows all over my screen. Thanks @dnakov @koekeishiya!
Most helpful comment
Should be resolved on master. Please verify.