From c3e84e107326789ee8b10c3ac6aa23d5b8f66d11 Mon Sep 17 00:00:00 2001 From: Alex Nemeth Date: Tue, 1 May 2018 16:13:14 +0200 Subject: [PATCH] [effects/desktopgrid] Enable blur behind windows Summary: Use the blur effect even when the desktop grid is used. Test Plan: {F5828458} Reviewers: davidedmundson, fredrik, #vdg, #kwin, graesslin, ngraham Reviewed By: #vdg, #kwin, graesslin, ngraham Subscribers: graesslin, kwin, #kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D12620 --- effects/desktopgrid/desktopgrid.cpp | 11 +++++++++++ effects/desktopgrid/desktopgrid.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 82c6d308e9..57d19d226e 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -162,6 +162,12 @@ void DesktopGridEffect::prePaintScreen(ScreenPrePaintData& data, int time) if (!activated && timeline.currentValue() == 0 && !(isUsingPresentWindows() && isMotionManagerMovingWindows())) finish(); } + + for (auto const &w : effects->stackingOrder()) { + m_windowForceBlurRoleState[w] = w->data(WindowForceBlurRole).toBool(); + w->setData(WindowForceBlurRole, QVariant(true)); + } + effects->prePaintScreen(data, time); } @@ -249,6 +255,11 @@ void DesktopGridEffect::postPaintScreen() } } } + + for (auto &w : effects->stackingOrder()) { + w->setData(WindowForceBlurRole, m_windowForceBlurRoleState.value(w, false)); + } + effects->postPaintScreen(); } diff --git a/effects/desktopgrid/desktopgrid.h b/effects/desktopgrid/desktopgrid.h index 3c95eee0c2..b61383e71a 100644 --- a/effects/desktopgrid/desktopgrid.h +++ b/effects/desktopgrid/desktopgrid.h @@ -175,6 +175,9 @@ private: // Shortcut - needed to toggle the effect QList shortcut; + // State of WindowForceBlurRole before this effect + QMap m_windowForceBlurRoleState; + PresentWindowsEffectProxy* m_proxy; QList m_managers; bool m_usePresentWindows;