yabai icon indicating copy to clipboard operation
yabai copied to clipboard

Incorrect stack window is focused

Open jmagers opened this issue 7 months ago • 0 comments

Description

The wrong stack window is focused in the following use case:

  1. The command yabai -m window --stack <WINDOW_SEL> is used to stack the current window on top of another window.
  2. A command such as yabai -m window --focus west is used to change focus to a different window that is not in the stack.
  3. A command such as yabai -m window --focus east is used to change focus back to the stack.

Expected result The window at the front of the stack is focused.

Actual result The next window in the stack is focused instead of the one that is currently at the front.

Additional notes The bug doesn't seem to occur if the windows change focus through mouse clicks or if the windows are stacked through the use of "mouse_drop_action".

Tested on yabai-v7.1.1

Example

https://github.com/user-attachments/assets/61f58496-115b-483f-802e-cab951f0603a

The video uses the following command in the terminal:

sleep 1; yabai -m window --stack south; \
sleep 1; yabai -m window --focus west; \
sleep 1; yabai -m window --focus east;

jmagers avatar Jul 14 '24 19:07 jmagers