uebersicht
uebersicht copied to clipboard
Backdrop filter 'blinks' when moving through spaces
Just as title says - anything with any backdrop filter on it (blur, saturate, grayscale etc.) blinks when switching spaces. It doesn't happen every time though, and it is completely random. When it occurs, you can see everything else regularly - except the backdrop filter, which kicks in a few moments later - making the widget 'blink'.
Tested on iMac (late 2013) and Macbook Air (late 2012).
I can post short screencast in case I haven't made myself clear 😄
Amazing app, btw!
On that note - wouldn't it make sense to use native vibrancy (via NSVisualEffectView) instead? And create some simple API for it - allowing to set it up within the widgets script when needed.
It is actually a workaround to make background filters update when switching spaces. If they are not forced to redraw, they'll keep showing pixels from the previous space (noticeable when you have different wallpapers per space). The force redraw is what causes the flickering. Unfortunately I have not found another solution yet that doesn't flicker.
Regarding your suggestion using a NSVisualEffectView: I could picture some JS api using the scripting bridge that would allow you to set up a NSVisualEffectView. It would be behind the main Übersicht WebView and the api would allow you to size and position it. Is this something like what you had in mind?
Yeah, that makes a lot of sense. Is there an option to disable force redraw though? As I imagine it would fix the issue, at least if there are no different wallpapers of course...
As for NSVisualEffectView - yes, exactly what I had in mind.
(Sorry for the late reply - it's been a busy week)
So, there is no option to disable the force redraw at the moment. I also couldn't think of any way of hacking around it without changing the code. FYI, I'm currently emitting a custom dom event onwallpaperchange
and I react to it like this:
window.addEventListener 'onwallpaperchange', ->
# force a redraw of backdrop filters
contentEl.style.transform = 'translateZ(1px)'
requestAnimationFrame -> contentEl.style.transform = ''
I'm currently working hard on getting the next release out (ES6, CommonJS and a virtual DOM, like React). I will see if I can squeeze in some time to find a solution that has no flickering (maybe using your NSVisualEffectView
suggestion)
Gotcha! It would definitely be nice :) Kudos for working on a new rewrite as well - definitely looking forward to it!
Wonder where you're at with this refresh thing... It's too annoying right now to use the filters. Hope you'll find a way !
no progress yet unfortunately
I put some effort into this issue and created a small CLT that creates a blurred window using NSVisualEffectView.
In order to prevent blinking I had to use some sketchy stuff, because when using only one window per screen with .canJoinAllSpaces
you will still see a blinking effect if your spaces use different desktop images. To avoid this I used some private CoreGraphics APIs to create a separate windows for each space.
At the moment I start my tool after login, maybe we could add this to Übersicht in some way in the future.
Also note that this is still in early development.
@kinglouie thanks for the info! So it seems like this issues exists even when you use NSVisualEffectView directly?
Correct, the issue isn't as severe as the backdrop issue, but it is annoying nontheless. As with the backdrop filter the blurred background will dissappear for a short period of time, with NSVisualEffectView it doesn't disappear but you will still see the blurred background from the last desktop wallpaper for a short period.
The blinking is actually caused by Übersicht. It is forcing the backdrop to redraw, otherwise you would get what you described and worse, because the blurred background sometimes wouldn't redraw at all.
@felixhageloh wanting to check if a solution has been found for this. thanks!
the only solution to this would be to create a separate window for every space and since übersicht is a browserwindow this wouln't be very good performance wise. An alternative to creating multiple browserwindows would be creating some native windows with the backdrop for every space just as I demonstrated in earlier comments. I don't know if my tool still compiles because I dont use macOS anymore but with my tool I got a nice looking solution without any graphical issues.