Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Focus issue on multiscreen setup (and multiple windows from same app) #1764

Closed
thomaschrstnsn opened this issue May 30, 2023 · 6 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@thomaschrstnsn
Copy link

When using yabai -m window --focus and targeting a window on another screen, the window only gets "partial" focus. It can be resolved by clicking on the window using the pointer.

By "partial" focus, I mean that it receives keyboard events but the window is not fully focused.
As such a "wezterm" shows the "unfocused" caret, but clicking the window gives it "full" focus.

Other examples is yabai it self, which does not respond correctly to yabai -m window --focus west/east etc, after focusing a window on another space, responding with could not locate westward managed window. This seems to be mostly the case when there are multiple windows from the same app on the target screen.

This has broken somewhere between v5.0.2 and 4.0.1 (it worked on the 4)

Using macOS 13.4 without scripting additions on M1 MacBook Air.

Apologies if this was fixed after 5.0.2 (but scouring the changelog it seems like it has not been addressed).

Thanks for an awesome piece of software!

@koekeishiya
Copy link
Owner

koekeishiya commented May 30, 2023

Nothing has changed in how yabai does window focusing since the very beginning (#102 in version 1.0.6 - 2019-07-09); might be an internal macOS change in Ventura (likely caused by the rework required by Stage Manager (WindowManager service created by Apple) that interfaces with running software in some way).

@FelixKratz Do you remember having experienced this issue (since you have that Apple service disabled IIRC)?

@koekeishiya koekeishiya added the obscure Weird behaviour that is difficult to debug label May 30, 2023
@thomaschrstnsn
Copy link
Author

thomaschrstnsn commented May 30, 2023

Strange indeed.
It works when going back to 4.0.1, so no OS changes.

@koekeishiya
Copy link
Owner

Hm well that seems rather strange then; maybe something that I believe to be unrelated has somehow borked something.
If you can pinpoint the first release where it breaks, that would allow me to get to a fix faster, as you already seem to be able to reproduce the problem with relative ease.

For now, here is a complete diff of changes between v4.0.1 and v5.0.2: v4.0.1...v5.0.2

Most commits should also contain the respective issue that prompted the change.
Commits with no issue tag are cleanups that in theory should not alter any functionality

@koekeishiya koekeishiya added the bug Something isn't working label May 30, 2023
@thomaschrstnsn
Copy link
Author

Nevermind. I did the due diligence an upgraded to 5.0.6, and it seems to be fixed!

thomaschrstnsn added a commit to thomaschrstnsn/dotfiles that referenced this issue May 30, 2023
Solves the focus on other screen issue present until 5.0.2 atleast

koekeishiya/yabai#1764
@koekeishiya
Copy link
Owner

Right, I believe the bug was #1551 and the fix came in v5.0.3.

@koekeishiya koekeishiya added duplicate This issue or pull request already exists and removed bug Something isn't working obscure Weird behaviour that is difficult to debug labels May 30, 2023
@thomaschrstnsn
Copy link
Author

Funny, I just came to same conclusion, while going through the changelog...
Sorry for not testing on "latest" and wasting your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants