Closed crisidev closed 10 months ago
The assumption I made while building this tool is that a window which has focus is also ordered on top of the apps window list. This assumption is needed to acquire the window id of the active window without resorting to accessibility api. This heuristic works very well when no external tools modify the windows because it is rare (I never saw it happen actually) that a window is focused but not raised.
In principle this could be included with a more robust function that acquires the window id of the focused window (but without accessibility permissions) here: https://github.com/FelixKratz/JankyBorders/blob/616b015ffa4af11f61c5caa4ba4a8999ba399188/src/helpers.h#L65-L102
Thanks for the explanation.. This makes sense. I could try to hack around and see if I can find a way to ensure the window id is acquired properly, but it's the first time I work with MacOS internals, so it will probably take a while 😄
Ill mark this as not planned for now, but feel free to experiment with the code and submit a PR if you find something that works.
To reduce a little the scope, I have found that the issue happens only with windows from the same application.
@crisidev I had the same issue. I had focus_follows_mouse
set to autofocus
for yabai
, and it seems that changing that to autoraise
fixes the issue here.
Yeah, setting it to autoraise
solves the issue, but I really do not like the autoraise
behavior..
Lol, somehow missed you suggested that exact thing in your original post 🤦♂️ 😄
Lets track this issue here: #66.
I have resolved the issue. See https://github.com/FelixKratz/JankyBorders/issues/66#issuecomment-1939713220
Hello, I am not sure if this is by design or not :)
I use yabai with
focus_follows_mouse autofocus
and if I have 2 windows in the same space and move the mouse from the active one to other, the border remain on the first window, while the focus changes. The same does not happen of course if I usefocus_follows_mouse autoraise
.Would you be open to enable this functionality (I am not even sure its possible)?