Skip to content

effects/{blur,contrast,slidingpopups}: Schedule manager removal with a delay

Vlad Zahorodnii requested to merge work/zzag/effects-delay-removing-globals into master

This prevents flickering behind plasma panels after changing compositing settings.

If the blur effect is disabled, the destructor of the BlurEffect will start the blur manager remove timer. When it expires, the blur manager global will be removed and it will be finally destroyed after 5s (to work around the wl_global race condition).

If compositing is toggled, the destructor of the BlurEffect will start the remove timer and the constructor of the BlurEffect will stop the timer, the blur manager object will be unaffected.

The blur effect options don't affect the generated shader code, so the shader status check was removed in reconfigure().


This prevents flickering behind plasma panels after changing compositing settings.

If the contrast effect is disabled, the destructor of the ContrastEffect will start the contrast manager remove timer. When it expires, the contrast manager global will be removed and it will be finally destroyed after 5s (to work around the wl_global race condition).

If compositing is toggled, the destructor of the ContrastEffect will start the remove timer and the constructor of the ContrastEffect will stop the timer, the contrast manager object will be unaffected.

The contrast effect has no options that could affect the shader, so the reconfigure() method was removed.


PS: A bit ugly solution, but it should work. Needed to avoid mistriggering cleanup code in kwayland-integration!16 (merged)

Edited by Vlad Zahorodnii

Merge request reports