plugins/glide: drop references to closed windows if they're not animated
Otherwise the window might still be referenced from the opening animation, which can lead to the effect wrongly keeping a reference to the window and staying active. CCBUG: 485425
This commit is contained in:
parent
465873ecac
commit
64d70029ec
1 changed files with 8 additions and 12 deletions
|
@ -217,22 +217,18 @@ void GlideEffect::windowAdded(EffectWindow *w)
|
||||||
|
|
||||||
void GlideEffect::windowClosed(EffectWindow *w)
|
void GlideEffect::windowClosed(EffectWindow *w)
|
||||||
{
|
{
|
||||||
if (effects->activeFullScreenEffect()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isGlideWindow(w)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!w->isVisible() || w->skipsCloseAnimation()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const void *closeGrab = w->data(WindowClosedGrabRole).value<void *>();
|
const void *closeGrab = w->data(WindowClosedGrabRole).value<void *>();
|
||||||
if (closeGrab && closeGrab != this) {
|
if (closeGrab && closeGrab != this) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (effects->activeFullScreenEffect() || !isGlideWindow(w) || !w->isVisible() || w->skipsCloseAnimation()) {
|
||||||
|
const auto it = m_animations.find(w);
|
||||||
|
if (it != m_animations.end()) {
|
||||||
|
unredirect(w);
|
||||||
|
m_animations.erase(it);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast<void *>(this)));
|
w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast<void *>(this)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue