[effects/presentwindows] Enable blur behind windows

Summary:
Use the blur effect even when the present windows is used.
Previously it was only enabled for the close buttons and the dock.

Test Plan: {F5828442}

Reviewers: davidedmundson, fredrik, #vdg, #kwin, graesslin, ngraham

Reviewed By: #vdg, #kwin, graesslin, ngraham

Subscribers: ngraham, zzag, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12619
This commit is contained in:
Alex Nemeth 2018-05-01 22:55:48 +02:00
parent a5a661211c
commit 424b9ac388
2 changed files with 8 additions and 8 deletions

View file

@ -244,10 +244,8 @@ void PresentWindowsEffect::postPaintScreen()
m_windowData.clear(); m_windowData.clear();
foreach (EffectWindow * w, effects->stackingOrder()) { foreach (EffectWindow * w, effects->stackingOrder()) {
if (w->isDock()) { w->setData(WindowForceBlurRole, QVariant(m_windowForceBlurRoleState.value(w, false)));
w->setData(WindowForceBlurRole, QVariant(false)); w->setData(WindowForceBackgroundContrastRole, QVariant(false));
w->setData(WindowForceBackgroundContrastRole, QVariant(false));
}
} }
effects->setActiveFullScreenEffect(NULL); effects->setActiveFullScreenEffect(NULL);
effects->addRepaintFull(); effects->addRepaintFull();
@ -1586,10 +1584,9 @@ void PresentWindowsEffect::setActive(bool active)
setHighlightedWindow(effects->activeWindow()); setHighlightedWindow(effects->activeWindow());
foreach (EffectWindow * w, effects->stackingOrder()) { foreach (EffectWindow * w, effects->stackingOrder()) {
if (w->isDock()) { m_windowForceBlurRoleState[w] = w->data(WindowForceBlurRole).toBool();
w->setData(WindowForceBlurRole, QVariant(true)); w->setData(WindowForceBlurRole, QVariant(true));
w->setData(WindowForceBackgroundContrastRole, QVariant(true)); w->setData(WindowForceBackgroundContrastRole, QVariant(true));
}
} }
} else { } else {
m_needInitialSelection = false; m_needInitialSelection = false;

View file

@ -309,6 +309,9 @@ private:
// Grid layout info // Grid layout info
QList<GridSize> m_gridSizes; QList<GridSize> m_gridSizes;
// State of WindowForceBlurRole before this effect
QMap <EffectWindow*, bool> m_windowForceBlurRoleState;
// Filter box // Filter box
EffectFrame* m_filterFrame; EffectFrame* m_filterFrame;
QString m_windowFilter; QString m_windowFilter;