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);