Skip to content

plugins/blur: Fix a crash in BlurEffect::updateBlurRegion()

Vlad Zahorodnii requested to merge work/zzag/plugins-blur-contrast-crash into master

The updateBlurRegion() creates ItemEffect() objects to block direct scanout. However, it doesn't take into account that the surface item can be null when a window is added. It can happen with Xwayland windows.

The blur effect creates ItemEffect objects for the SurfaceItem and the DecorationItem, which is reasonable. But on the other hand, the blur effect still operates per window. So this change simply makes the blur effect register an ItemEffect with the WindowItem. When proper per item effects are supported, this can be changed (the blur effect would need to monitor the wl_surface getting added and removed).

See also https://crash-reports.kde.org/organizations/kde/issues/61988

Merge request reports