Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Focus stops following mouse after using mission control #319

Closed
marcelja opened this issue Nov 20, 2019 · 5 comments
Closed

Focus stops following mouse after using mission control #319

marcelja opened this issue Nov 20, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@marcelja
Copy link

I set the focus to follow the mouse
yabai -m config focus_follows_mouse autofocus

When I open mission control, e.g. using yabai -m space 1 --toggle mission-control, and close it afterwards, the focus is not following the mouse anymore.

▶ yabai --version
yabai-v2.1.2
@marcelja
Copy link
Author

doesn't happen anymore

@marcelja
Copy link
Author

marcelja commented Nov 20, 2019

Ok, I guess that I found a way to reproduce this.

  • Have multiple screens
  • Make a window native-fullscreen
  • Open mission control
  • Close mission control
  • Try to change focus to another window using the mouse

@marcelja marcelja reopened this Nov 20, 2019
@ychnh
Copy link

ychnh commented Nov 25, 2019

I am having a similar issue.
When I use mission control switch desktop spaces with multiple monitors, yabai will swap focus to the other monitor 2 when i switch desktop spaces on monitor 1.

@koekeishiya koekeishiya added bug Something isn't working obscure Weird behaviour that is difficult to debug labels Dec 14, 2019
@koekeishiya koekeishiya removed the obscure Weird behaviour that is difficult to debug label Jan 19, 2020
@koekeishiya
Copy link
Owner

I am having a similar issue.
When I use mission control switch desktop spaces with multiple monitors, yabai will swap focus to the other monitor 2 when i switch desktop spaces on monitor 1.

I'm unable to reproduce this. Need clearer steps to reproduce. Also, please create a new issue for that as these are not similar issues at all.

Ok, I guess that I found a way to reproduce this.

Have multiple screens
Make a window native-fullscreen
Open mission control
Close mission control
Try to change focus to another window using the mouse

So the reason this is happening is that we disable mouse-tracking when mission-control is active.
There is no event triggered by macOS when mission-control is exited, but we poll to check whether the mission-control window exists. This check apparently does not work when a fullscreen app is in focus, causing the issue you've described here.

@koekeishiya
Copy link
Owner

Fixed on master.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants