Only try to deactivate overview whilst activate

BUG: 441325
This commit is contained in:
David Edmundson 2021-08-24 21:45:17 +02:00
parent fbff8636b9
commit 2fb52274d0

View file

@ -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<OverviewConfig>();
reconfigure(ReconfigureAll);