Activities now accept AbstractClient, no need to downcast

Which means now it doesn't need to be limited to X11Clients only.
This commit is contained in:
Kevin Ottens 2021-03-05 14:07:23 +01:00 committed by Kevin Ottens
parent 228a6e444a
commit 41766d3594

View file

@ -789,12 +789,7 @@ void UserActionsMenu::slotToggleOnActivity(QAction *action)
return;
}
X11Client *c = dynamic_cast<X11Client *>(m_client.data());
if (!c) {
return;
}
Activities::self()->toggleClientOnActivity(c, activity, false);
Activities::self()->toggleClientOnActivity(m_client, activity, false);
if (m_activityMenu && m_activityMenu->isVisible() && m_activityMenu->actions().count()) {
const bool isOnAll = m_client->isOnAllActivities();
m_activityMenu->actions().at(0)->setChecked(isOnAll);