From 10e99f64c1e1f50c678a39114b1bd6b287c89479 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Thu, 2 Aug 2018 16:44:31 +0300 Subject: [PATCH] [effects/sheet] Grab modal windows Summary: If both the Glide effect and the Sheet effect are enabled, they will conflict. Expected behavior would be: * the Sheet effect animates only modal windows; * the Glide effect animates the rest of normal windows. In order to resolve the conflict, the Sheet effect has to grab modal windows. Because it's quite specialized effect, we have to ignore whether modal windows have been grabbed by the Glide effect. Test Plan: * Enabled both the Glide effect and the Sheet effect; * Opened Kate; * Opened "Open file" dialog; * Closed the dialog. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: abetts, davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D14560 --- effects/sheet/sheet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/effects/sheet/sheet.cpp b/effects/sheet/sheet.cpp index 79730278bb..f40350bb1f 100644 --- a/effects/sheet/sheet.cpp +++ b/effects/sheet/sheet.cpp @@ -137,6 +137,9 @@ void SheetEffect::slotWindowAdded(EffectWindow* w) break; } } + + w->setData(WindowAddedGrabRole, QVariant::fromValue(static_cast(this))); + w->addRepaintFull(); } @@ -168,6 +171,9 @@ void SheetEffect::slotWindowClosed(EffectWindow* w) } if (!found) info->parentY = 0; + + w->setData(WindowClosedGrabRole, QVariant::fromValue(static_cast(this))); + w->addRepaintFull(); }