diff --git a/effects/slidingpopups/slidingpopups.h b/effects/slidingpopups/slidingpopups.h --- a/effects/slidingpopups/slidingpopups.h +++ b/effects/slidingpopups/slidingpopups.h @@ -84,10 +84,6 @@ }; long mAtom; - // This list is only for appearing windows: we remember that we've enabled the - // WindowBackgroundContrastForcedRole flag, so we can remove it later. - // It doesn't matter for disappearing windows, they'll be deleted anyway. - QList< const EffectWindow* > m_backgroundContrastForced; QHash< const EffectWindow*, TimeLine > mAppearingWindows; QHash< const EffectWindow*, TimeLine > mDisappearingWindows; QHash< const EffectWindow*, Data > mWindowsData; diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -105,12 +105,8 @@ appearing = true; } else { mAppearingWindows.remove(w); + w->setData(WindowForceBackgroundContrastRole, false); w->setData(WindowForceBlurRole, false); - if (m_backgroundContrastForced.contains(w) && w->hasAlpha() && - w->data(WindowForceBackgroundContrastRole).toBool()) { - w->setData(WindowForceBackgroundContrastRole, QVariant()); - m_backgroundContrastForced.removeAll(w); - } } } else if (mDisappearingWindows.contains(w)) { @@ -304,11 +300,6 @@ void SlidingPopupsEffect::startForShow(EffectWindow *w) { if (w->isOnCurrentDesktop() && mWindowsData.contains(w)) { - if (!w->data(WindowForceBackgroundContrastRole).toBool() && w->hasAlpha()) { - w->setData(WindowForceBackgroundContrastRole, QVariant(true)); - m_backgroundContrastForced.append(w); - } - mDisappearingWindows.remove(w); TimeLine &timeLine = mAppearingWindows[ w ]; @@ -319,6 +310,7 @@ w->setData(WindowAddedGrabRole, QVariant::fromValue(static_cast(this))); w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast(this))); + w->setData(WindowForceBackgroundContrastRole, true); w->setData(WindowForceBlurRole, true); w->addRepaintFull(); @@ -344,14 +336,11 @@ // Tell other windowClosed() effects to ignore this window w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast(this))); + w->setData(WindowForceBackgroundContrastRole, true); w->setData(WindowForceBlurRole, true); - if (!w->data(WindowForceBackgroundContrastRole).toBool() && w->hasAlpha()) { - w->setData(WindowForceBackgroundContrastRole, QVariant(true)); - } w->addRepaintFull(); } - m_backgroundContrastForced.removeAll(w); } void SlidingPopupsEffect::slotWindowDeleted(EffectWindow* w)