[shadow] Rebuild quads after creation of shadow

Summary:
If a shadow is installed for already rendered window, the shadow won't
be initially rendered because we don't rebuild window quad cache.

BUG: 398572
FIXED-IN: 5.14.0

Test Plan: Can't reproduce 398572 anymore.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15475
This commit is contained in:
Vlad Zagorodniy 2018-09-13 13:59:06 +03:00
parent 0a2e51db47
commit 213239a0ea

View file

@ -60,15 +60,14 @@ Shadow *Shadow::createShadow(Toplevel *toplevel)
if (!shadow && kwinApp()->x11Connection()) {
shadow = createShadowFromX11(toplevel);
}
if (shadow) {
if (toplevel->effectWindow() && toplevel->effectWindow()->sceneWindow()) {
toplevel->effectWindow()->sceneWindow()->updateShadow(shadow);
}
if (shadow->hasDecorationShadow()) {
if (toplevel->effectWindow()) {
toplevel->effectWindow()->buildQuads(true);
}
}
if (!shadow) {
return nullptr;
}
if (toplevel->effectWindow() && toplevel->effectWindow()->sceneWindow()) {
toplevel->effectWindow()->sceneWindow()->updateShadow(shadow);
}
if (toplevel->effectWindow()) {
toplevel->effectWindow()->buildQuads(true);
}
return shadow;
}