From 424b9ac388b9a70b34a9d39c574a49539af87c04 Mon Sep 17 00:00:00 2001 From: Alex Nemeth Date: Tue, 1 May 2018 22:55:48 +0200 Subject: [PATCH] [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 --- effects/presentwindows/presentwindows.cpp | 13 +++++-------- effects/presentwindows/presentwindows.h | 3 +++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index dbf0cdf893..4ee5827a55 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -244,10 +244,8 @@ void PresentWindowsEffect::postPaintScreen() m_windowData.clear(); foreach (EffectWindow * w, effects->stackingOrder()) { - if (w->isDock()) { - w->setData(WindowForceBlurRole, QVariant(false)); - w->setData(WindowForceBackgroundContrastRole, QVariant(false)); - } + w->setData(WindowForceBlurRole, QVariant(m_windowForceBlurRoleState.value(w, false))); + w->setData(WindowForceBackgroundContrastRole, QVariant(false)); } effects->setActiveFullScreenEffect(NULL); effects->addRepaintFull(); @@ -1586,10 +1584,9 @@ void PresentWindowsEffect::setActive(bool active) setHighlightedWindow(effects->activeWindow()); foreach (EffectWindow * w, effects->stackingOrder()) { - if (w->isDock()) { - w->setData(WindowForceBlurRole, QVariant(true)); - w->setData(WindowForceBackgroundContrastRole, QVariant(true)); - } + m_windowForceBlurRoleState[w] = w->data(WindowForceBlurRole).toBool(); + w->setData(WindowForceBlurRole, QVariant(true)); + w->setData(WindowForceBackgroundContrastRole, QVariant(true)); } } else { m_needInitialSelection = false; diff --git a/effects/presentwindows/presentwindows.h b/effects/presentwindows/presentwindows.h index 6e95bdada9..3a218da491 100644 --- a/effects/presentwindows/presentwindows.h +++ b/effects/presentwindows/presentwindows.h @@ -309,6 +309,9 @@ private: // Grid layout info QList m_gridSizes; + // State of WindowForceBlurRole before this effect + QMap m_windowForceBlurRoleState; + // Filter box EffectFrame* m_filterFrame; QString m_windowFilter;