Closed lokxii closed 1 year ago
I have noticed this too. It has something to do with the animations in macOS. When I disable those animations (with yabai) the aliases do not disappear anymore.
I think it could be that I have to check if the display is animating before capturing the surface of the default bar item.
Hmm, so it seems that calling
extern void SLSCaptureWindowsContentsToRectWithOptions(uint32_t cid, uint64_t* wid, uint32_t count, CGRect bounds, uint32_t flags, CGImageRef* image);
during a system animation leaves the macOS bar windows in a state where their surfaces can not be captured again until another event updates them (e.g. another space change or revealing the macOS bar). This can be mitigated by choosing a higher alias.update_freq
or by disabling the system animations.
I've set alias.update_freq=1
and the items doesn't seem to disappear (or at least I haven't notice it). Sketchybar doesn't seem to use much resources because of this so I will just stick with this solution. Thank you for your response :)
I think alias.update_freq=5
will reduce the probability of this happening on space change, while alias.update_freq=1
is default. I will have to look for a way to detect these animations…
I think this commit should fix it: 2f01d41
Default menu items sometimes disappears from sketchybar. Although I notice it mostly after switching spaces, I believe its not the only time when the items disappears.