~mir-team/unity-mir/mir-0.2.0-compatibility-changes

« back to all changes in this revision

Viewing changes to src/modules/Unity/Application/application.cpp

  • Committer: Kevin Gunn
  • Date: 2014-05-19 15:47:35 UTC
  • mfrom: (219.3.2 unity-mir)
  • Revision ID: kevin.gunn@canonical.com-20140519154735-tnbluok5stj6nfk0
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
    m_suspendTimer->setSingleShot(true);
54
54
    connect(m_suspendTimer, SIGNAL(timeout()), this, SLOT(suspend()));
 
55
 
 
56
    // FIXME(greyback) need to save long appId internally until upstart-app-launch can hide it from us
 
57
    m_longAppId = desktopFileReader->file().remove(QRegExp(".desktop$")).split('/').last();
55
58
}
56
59
 
57
60
Application::~Application()
276
279
void Application::suspend()
277
280
{
278
281
    DLOG("Application::suspend (this=%p)", this);
279
 
    m_taskController->suspend(appId());
 
282
    m_taskController->suspend(longAppId());
280
283
}
281
284
 
282
285
void Application::resume()
283
286
{
284
287
    DLOG("Application::resume (this=%p)", this);
285
 
    m_taskController->resume(appId());
 
288
    m_taskController->resume(longAppId());
286
289
}
287
290
 
288
291
void Application::respawn()
291
294
    m_taskController->start(appId(), m_arguments);
292
295
}
293
296
 
 
297
QString Application::longAppId() const
 
298
{
 
299
    return m_longAppId;
 
300
}
 
301
 
294
302
} // namespace unitymir