koekeishiya / yabai

A tiling window manager for macOS based on binary space partitioning
MIT License
24.05k stars 649 forks source link

App steals focus and auto-switch workspace #2241

Open ognistik opened 6 months ago

ognistik commented 6 months ago

I have this issue with several apps, not one in particular. Where this is the most obvious and easy to replicate is with Arc. If I am playing a YT video and try to go to a different workspace, the PiP window will pop for a second and then pull me back to the workspace which has Arc.

Several other apps randomly don't let me switch workspace and "pull me back" to their own workspace. I am not sure, but seems to be mostly video players, or video editing apps, and it may have to do with the video of an app still playing when I switch spaces. Once I yabai --stop-service this issue disappears.

BTW, my yabairc has both mouse_follows_focus and focus_follows_mouse off. I do have the scripting addition and SiP partially disabled. Everything seems to be running without issues with the one exception being this focus annoying problem.

~I thought I'd try to debug this by running the service as yabai --verbose in terminal and to my surprise the issue is totally gone there.** Arc PiP doesn't steal the focus and it's the same with any other app.~

~What could be going on here? Everything runs perfectly in --verbose but as soon as I go back to yabai --start-service the problem comes back.~

EDIT. After much more testing I've figured out the problem persists even when running as --verbose.

danilkinkin commented 5 months ago

This problem is very annoying, is there any update?

afadingthought commented 5 months ago

This problem is very annoying, is there any update?

Unfortunately, there seems to be no fix yet.

My workaround is to minimize the window that's causing the problem. In Arc, if I want to us PiP, I have to use the PiP Chrome Extension to activate Pip and then minimize Arc's window. I do think the problem is Yabai and not Arc since it happens with other apps as well (happens with Screen Studio all the time as well).

Super annoying.

danilkinkin commented 5 months ago

If I have option for fully disable to switch workspaces it's resolved the problem for me, but I can't find option in documentation

neilord commented 4 months ago

Hi! Have you found any solution for this one?

ognistik commented 4 months ago

Hi! Have you found any solution for this one?

Nope. The problem is still there and other than minimizing the window in question I don't know what else to do yet.