diff --git a/src/libkwineffects/kwinoffscreeneffect.cpp b/src/libkwineffects/kwinoffscreeneffect.cpp index f7257d2ef5..82abea675c 100644 --- a/src/libkwineffects/kwinoffscreeneffect.cpp +++ b/src/libkwineffects/kwinoffscreeneffect.cpp @@ -350,9 +350,20 @@ void CrossFadeEffect::redirect(EffectWindow *window) } offscreenData = std::make_unique(); + // Avoid including blur and contrast effects. During a normal painting cycle they + // won't be included, but since we call effects->drawWindow() outside usual compositing + // cycle, we have to prevent backdrop effects kicking in. + const QVariant blurRole = window->data(WindowForceBlurRole); + window->setData(WindowForceBlurRole, QVariant()); + const QVariant contrastRole = window->data(WindowForceBackgroundContrastRole); + window->setData(WindowForceBackgroundContrastRole, QVariant()); + effects->makeOpenGLContextCurrent(); offscreenData->maybeRender(window); offscreenData->frameGeometryAtCapture = window->frameGeometry(); + + window->setData(WindowForceBlurRole, blurRole); + window->setData(WindowForceBackgroundContrastRole, contrastRole); } void CrossFadeEffect::unredirect(EffectWindow *window)