yabai
yabai copied to clipboard
Flickering on new window
After a friend of mine showed me his BSPWM setup I immediately started to notice the strong flickering when creating new windows with yabai, e.g. (slowed down gif, click image if not playing):
While this is not really an issue/problem it actually bothers me a lot, now that I noticed it. I played a bit with the code and came up with something more pleasing for the eyes:
The changes I made for this are here: https://github.com/FelixKratz/yabai/commit/f1ddaa0f7687fe027456e334f2e49b674c649990
Basically I make the window completely transparent after creation and only make it visible again after it is ordered in and I changed the border logic a bit. This completely eliminates the visual flicker.
Maybe this would be a nice addition for the master branch once implemented properly.
The password prompt for unlocking system preferences does not like being transparent, even temporarily, password entry will be impossible afterwards.
I believe this https://github.com/koekeishiya/yabai/blob/7e9b09b964a93a1cd376ba91509ef54a6427ed4e/src/space_manager.c#L409 causes all windows to be repositioned via the AX api and can suffer from the slow api. Is there any reason why it wouldn't be possible to flush only the affected window nodes, as this also amplifies the flickering? I have used the window node flushing implementation for a while and have not noticed any side effects so far.
causes all windows to be repositioned via the AX api and can suffer from the slow api. Is there any reason why it wouldn't be possible to flush only the affected window nodes, as this also amplifies the flickering? I have used the window node flushing implementation for a while and have not noticed any side effects so far.
You are probably correct here. I'll make a note to review my implementation of refresh, dirty flag etc.
Commit https://github.com/koekeishiya/yabai/commit/41414989666232f4344329e250f38db2f0a1cc48 should make it so that we only call the AX API for windows that are affected by the changes to the tree.
This is fixed by the new animation system.