From 49fc31059433fe495090b8987e07043b4e3d893d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 28 Mar 2017 17:51:00 +0200 Subject: [PATCH] [slidingpopups] Only remove WindowClosedGrabRole if the effect owns the grab Summary: The effect unset the WindowClosedGrabRole unconditionally if it does not manage the window. This results in any grab set by other effects to break. BUG: 376609 FIXED-IN: 5.9.5 Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D5225 --- effects/slidingpopups/slidingpopups.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index 174f67b65b..483dddedae 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -360,7 +360,9 @@ void SlidingPopupsEffect::slotPropertyNotify(EffectWindow* w, long a) if (data.length() < 1) { // Property was removed, thus also remove the effect for window - w->setData(WindowClosedGrabRole, QVariant()); + if (w->data(WindowClosedGrabRole).value() == this) { + w->setData(WindowClosedGrabRole, QVariant()); + } delete mAppearingWindows.take(w); delete mDisappearingWindows.take(w); mWindowsData.remove(w);