Commit 6ae7d885 authored by pontaoski's avatar pontaoski 🌈 Committed by David Edmundson
Browse files

[applets/appmenu] Handle appmenu location changing

parent d7922985
......@@ -58,6 +58,13 @@ AppMenuModel::AppMenuModel(QObject *parent)
{
m_tasksModel->setFilterByScreen(true);
connect(m_tasksModel, &TaskManager::TasksModel::activeTaskChanged, this, &AppMenuModel::onActiveWindowChanged);
connect(m_tasksModel, &TaskManager::TasksModel::dataChanged, [=](const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>()) {
Q_UNUSED(topLeft)
Q_UNUSED(bottomRight)
if (roles.contains(TaskManager::AbstractTasksModel::ApplicationMenuObjectPath) || roles.contains(TaskManager::AbstractTasksModel::ApplicationMenuServiceName) || roles.isEmpty()) {
onActiveWindowChanged();
}
});
connect(m_tasksModel, &TaskManager::TasksModel::activityChanged, this, &AppMenuModel::onActiveWindowChanged);
connect(m_tasksModel, &TaskManager::TasksModel::virtualDesktopChanged, this, &AppMenuModel::onActiveWindowChanged);
connect(m_tasksModel, &TaskManager::TasksModel::countChanged, this, &AppMenuModel::onActiveWindowChanged);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment