fix (static-blur): Invalidate cached wallpaper when changed#272
fix (static-blur): Invalidate cached wallpaper when changed#272Kayzels wants to merge 2 commits into
Conversation
|
That still won't invalidate the static blur texture if icons or widgets change. Try using the |
Not a bad idea, I wasn't aware of those. I've tried with both I couldn't figure out how to limit it: I tried adding a QTimer to denounce those, but they were so frequent that the timeout never happened. Not really sure what else to try, to limit the redraw, but still have it aware of the changes. |
Problem: With the change to Plasma 6.5, the static blur is now no longer correctly recalculated when wallpapers or activities change. This means that a dark blur can show when in light mode, and vice versa. Previously, I think checking the frameGeometry for the changed window against a boundingRect worked. But now, it seemed that that boundingRect always had a size of 0, and so the cache was never cleared.
Solution: Instead of checking the window dimensions, use DBus to find out if a wallpaper has changed, and if so, clear the cached texture for that screen. I've tried to make it so that the DBus connection is only created and used if static blur is enabled, and the wallpaper is used.
Note: This does not solve the issue with the cached textures being wrong when switching between activities. I'm struggling to get that working: it seems that the
currentActivityChangedsignal happens before it changes the wallpaper, so clearing the cache will just calculate the same wallpaper as before, so Activity 2 would get the wallpaper for Activity 1 cached, and vice versa. I also haven't tested this in X11, as I don't have that on my system.