effects/windowview: Fix "Toggle Present Windows (Window class on current desktop)" shortcut

The effect was not turning off when pressing a shortcut again, unlike
other flavors of this effects.

BUG: 156155
FIXED-IN: 5.26
This commit is contained in:
ivan tkachenko 2022-09-17 01:57:14 +03:00
parent 3aa1411d94
commit 984388dba4
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -71,9 +71,9 @@ WindowViewEffect::WindowViewEffect()
});
m_exposeClassCurrentDesktopAction->setObjectName(QStringLiteral("ExposeClassCurrentDesktop"));
m_exposeClassAction->setText(i18n("Toggle Present Windows (Window class on current desktop)"));
effects->registerGlobalShortcut(QKeySequence{}, m_exposeClassAction);
connect(m_exposeClassAction, &QAction::triggered, this, [this]() {
m_exposeClassCurrentDesktopAction->setText(i18n("Toggle Present Windows (Window class on current desktop)"));
effects->registerGlobalShortcut(QKeySequence{}, m_exposeClassCurrentDesktopAction);
connect(m_exposeClassCurrentDesktopAction, &QAction::triggered, this, [this]() {
toggleMode(ModeWindowClassCurrentDesktop);
});