From 2fb52274d09099855cf5d6e9f75cbe00b88fd3c8 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 24 Aug 2021 21:45:17 +0200 Subject: [PATCH] Only try to deactivate overview whilst activate BUG: 441325 --- src/effects/overview/overvieweffect.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/effects/overview/overvieweffect.cpp b/src/effects/overview/overvieweffect.cpp index 64597cdacc..8f0a54bbf7 100644 --- a/src/effects/overview/overvieweffect.cpp +++ b/src/effects/overview/overvieweffect.cpp @@ -82,7 +82,11 @@ OverviewEffect::OverviewEffect() m_toggleShortcut = KGlobalAccel::self()->shortcut(m_toggleAction); effects->registerGlobalShortcut({defaultToggleShortcut}, m_toggleAction); - connect(effects, &EffectsHandler::screenAboutToLock, this, &OverviewEffect::realDeactivate); + connect(effects, &EffectsHandler::screenAboutToLock, this, [this]() { + if (m_activated) { + realDeactivate(); + } + }); initConfig(); reconfigure(ReconfigureAll);