Skip to content

libkwineffects: Avoid accessing effects in EffectQuickView

EffectQuickView is used by Aurorae. As long as Aurorae decorations are rendered by kwin, it's not a problem. However, kde-gtk-config kded module can also render them. This creates a problem. If effects object is not created, accessing any of its getters or setters will result in a segmentation fault.

This change rewrites the share context check so the effects object is not accessed anymore.

One could argue that kde-gtk-config has to provide a dummy EffectsHandler but it doesn't use effects and libkwineffects is not a dependency of KDecoration2. So, providing a dummy EffectsHandler makes no sense.

In hindsight, we need to revisit the usage of EffectQuickView in Aurorae as accessing the EffectsHandler in EffectQuickView is a totally valid usecase and integration of QOpenGLContext.

BUG: 441585

Merge request reports