@@ -184,6 +184,29 @@ void LauncherModel::setUser(const QString &username)
184184 m_backend->setUser(username);
185185}
186186
187+void LauncherModel::applicationFocused(const QString &appId)
188+{
189+ int index = findApplication(appId);
190+
191+ if (index >= 0) {
192+ // TODO: Mark application as focued
193+ } else {
194+ // FIXME: The backend does not yet support this stuff
195+ // and currently the appId still is the desktopFile
196+ //QString desktopFile = m_backend->desktopFile(appId);
197+ QString desktopFile = appId;
198+
199+ QString appName = m_backend->displayName(appId);
200+ QString icon = m_backend->icon(appId);
201+
202+ LauncherItem *item = new LauncherItem(appId, desktopFile, appName, icon);
203+ beginInsertRows(QModelIndex(), m_list.count(), m_list.count());
204+ m_list.append(item);
205+ endInsertRows();
206+ storeAppList();
207+ }
208+}
209+
187210void LauncherModel::storeAppList()
188211{
189212 QStringList appIds;