From 7a6792aa2fb276d8c33a5a76c564fec5468d2429 Mon Sep 17 00:00:00 2001 From: Eric Edlund Date: Wed, 23 Feb 2022 15:04:12 -0500 Subject: [PATCH] Make desktop grid effect check for active effects before responding to gestures --- src/effects/desktopgrid/desktopgrid.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/effects/desktopgrid/desktopgrid.cpp b/src/effects/desktopgrid/desktopgrid.cpp index 71f6016720..ae1e859f86 100644 --- a/src/effects/desktopgrid/desktopgrid.cpp +++ b/src/effects/desktopgrid/desktopgrid.cpp @@ -67,6 +67,9 @@ DesktopGridEffect::DesktopGridEffect() QAction* a = m_gestureAction; connect(a, &QAction::triggered, this, [this]() { + if (effects->hasActiveFullScreenEffect() && effects->activeFullScreenEffect() != this) { + return; + } if ((qreal(timeline.currentTime()) / qreal(timeline.duration())) > 0.5) { if (effects->isScreenLocked()) { return; @@ -83,7 +86,12 @@ DesktopGridEffect::DesktopGridEffect() } }); effects->registerRealtimeTouchpadPinchShortcut(PinchDirection::Contracting, 4, a, [this](qreal cb) { - if (activated) return; + if (activated) { + return; + } + if (effects->hasActiveFullScreenEffect() && effects->activeFullScreenEffect() != this) { + return; + } if (timeline.currentValue() == 0) { activated = true; @@ -102,7 +110,6 @@ DesktopGridEffect::DesktopGridEffect() setup(); activated = false; } - timeline.setCurrentTime(timeline.duration() * cb); effects->addRepaintFull(); });