on xenial help sign in
disconnect surfaceCount signal again
8caafb4Michael Zanetti
plugins/Unity/Launcher/launchermodel.cpp+4−1
@@ -568,9 +568,10 @@ void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
568{
568{
569 Q_UNUSED(parent)
569 Q_UNUSED(parent)
570
570
571+ ApplicationInfoInterface *app = m_appManager->get(row);
571 int appIndex = -1;
572 int appIndex = -1;
572 for (int i = 0; i < m_list.count(); ++i) {
573 for (int i = 0; i < m_list.count(); ++i) {
573− if (m_list.at(i)->appId() == m_appManager->get(row)->appId()) {
574+ if (m_list.at(i)->appId() == app->appId()) {
574 appIndex = i;
575 appIndex = i;
575 break;
576 break;
576 }
577 }
@@ -581,6 +582,8 @@ void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
581 return;
582 return;
582 }
583 }
583
584
585+ disconnect(app, &ApplicationInfoInterface::surfaceCountChanged, this, &LauncherModel::applicationSurfaceCountChanged);
586+
584 LauncherItem * item = m_list.at(appIndex);
587 LauncherItem * item = m_list.at(appIndex);
585 item->setRunning(false);
588 item->setRunning(false);
586
589