asmvik / asmvik/yabai

Opening a new window that switches the focus to another space focuses Finder, not the window.

Open
#2,234 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
29.6k
Forks
750
PR merge metrics
No merged PRs in 30d

Description

Whenever I use a rule or focus a space in which no window has been focused, my focus is set to Finder, not the window. This behavior can also be seen when you close a window that is split-screened with another: when you close the window, focus remains even though it is not visible anymore.

I'm assuming this is just some quirk of MacOS, but it is so annoying to switch to a new space and have to click with my mouse to focus the window I literally just created and switched to.

One easy replication is to have a rule that puts a window in a specific space:
`yabai -m rule --add app="^Spotify$" space="^7"`
When you open Spotify, it switches to space 7 but finder is focused, not spotify.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the Spotify rule `yabai -m rule --add app="^Spotify$" space="^7"` and by closing a split-screen window. Trace the window and space focus handling, then verify that a newly shown window remains focused instead of Finder and that focus does not remain on a closed window.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, macos
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.