asmvik / asmvik/yabai

Display focus jumps after changing space

Open
#1,718 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
29.6k
Forks
758
PR merge metrics
No merged PRs in 30d

Description

Hey there! Thanks for your amazing work on yabai – it is pure bliss!

I am experiencing issue of display focus jumping to other display (I have 2 of them) when I change the space focus.

Space changes correctly all of the time, but occasionally display focus jumps to other display (it happens ~20% of the time)

Here are the commands that I use to change space:

```
# Desktops Navigation (four spaces per display): hyper - {1, 2, 3, 4}
hyper - 1 : DISPLAY="$(yabai -m query --displays --display | jq '.index')"; yabai -m space --focus $((1+4*($DISPLAY - 1)))
hyper - 2 : DISPLAY="$(yabai -m query --displays --display | jq '.index')"; yabai -m space --focus $((2+4*($DISPLAY - 1)))
hyper - 3 : DISPLAY="$(yabai -m query --displays --display | jq '.index')"; yabai -m space --focus $((3+4*($DISPLAY - 1)))
hyper - 4 : DISPLAY="$(yabai -m query --displays --display | jq '.index')"; yabai -m space --focus $((4+4*($DISPLAY - 1)))
```
I would appreciate any help!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the intermittent jump with the four hyper-key commands and the two-display setup described in the issue. Trace the display and space focus handling around these commands, then verify that changing a space keeps focus on the selected display every time.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.