From e38ecfcbcfe4233ad30cbc026cc43953b11d11ee Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Sun, 10 Jun 2018 23:39:22 +0300 Subject: [PATCH] [effects/slide] Completely delete forced roles Summary: The slide effect doesn't completely remove forced blur and background contrast roles. According to `EffectWindow::setData` implementation, ```lang=cpp void EffectWindowImpl::setData(int role, const QVariant &data) { if (!data.isNull()) dataMap[ role ] = data; else dataMap.remove(role); emit effects->windowDataChanged(this, role); } ``` in order to delete previously set data, we should pass a null variant. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D13470 --- effects/slide/slide.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/effects/slide/slide.cpp b/effects/slide/slide.cpp index 26c405f2f2..579c15bce3 100644 --- a/effects/slide/slide.cpp +++ b/effects/slide/slide.cpp @@ -456,12 +456,12 @@ void SlideEffect::start(int old, int current, EffectWindow* movingWindow) void SlideEffect::stop() { for (EffectWindow* w : m_forcedRoles.blur) { - w->setData(WindowForceBlurRole, QVariant(false)); + w->setData(WindowForceBlurRole, QVariant()); } m_forcedRoles.blur.clear(); for (EffectWindow* w : m_forcedRoles.backgroundContrast) { - w->setData(WindowForceBackgroundContrastRole, QVariant(false)); + w->setData(WindowForceBackgroundContrastRole, QVariant()); } m_forcedRoles.backgroundContrast.clear();