effects/morphingpopups: Fix glitch
There's a visual glitch that looks like a random rectangle in the top left corner of morphing popup. It appears like it's caused by the blur effect, it produces wrong results when the window is captured in CrossFadeEffect::redirect(). Make CrossFadeEffect::redirect() unset blur and contrast force roles, so the backdrop effects are not included in the captured frame.
This commit is contained in:
parent
d32f8df7c8
commit
dedae9e667
1 changed files with 11 additions and 0 deletions
|
@ -350,9 +350,20 @@ void CrossFadeEffect::redirect(EffectWindow *window)
|
||||||
}
|
}
|
||||||
offscreenData = std::make_unique<CrossFadeWindowData>();
|
offscreenData = std::make_unique<CrossFadeWindowData>();
|
||||||
|
|
||||||
|
// 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();
|
effects->makeOpenGLContextCurrent();
|
||||||
offscreenData->maybeRender(window);
|
offscreenData->maybeRender(window);
|
||||||
offscreenData->frameGeometryAtCapture = window->frameGeometry();
|
offscreenData->frameGeometryAtCapture = window->frameGeometry();
|
||||||
|
|
||||||
|
window->setData(WindowForceBlurRole, blurRole);
|
||||||
|
window->setData(WindowForceBackgroundContrastRole, contrastRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CrossFadeEffect::unredirect(EffectWindow *window)
|
void CrossFadeEffect::unredirect(EffectWindow *window)
|
||||||
|
|
Loading…
Reference in a new issue