~unity-team/qtmir/fix-some-lifecycle-bugs

« back to all changes in this revision

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

  • Committer: Daniel d'Andrada
  • Date: 2014-08-22 22:45:47 UTC
  • mto: This revision was merged to the branch mainline in revision 237.
  • Revision ID: daniel.dandrada@canonical.com-20140822224547-2f50ht45l3rcusg3
Application: keep fullscreen value when it loses its surface

Avoid flickering during application restarts

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
 
380
380
void Application::updateFullscreenProperty()
381
381
{
382
 
    setFullscreen(m_surface && m_surface->state() == MirSurfaceItem::Fullscreen);
 
382
    if (m_surface) {
 
383
        setFullscreen(m_surface->state() == MirSurfaceItem::Fullscreen);
 
384
    } else {
 
385
        // Keep the current value of the fullscreen property until we get a new
 
386
        // surface
 
387
    }
383
388
}
384
389
 
385
390
void Application::appendPromptSession(const std::shared_ptr<ms::PromptSession>& promptSession)