~aacid/qtmir/make_sure_surface_not_null

« back to all changes in this revision

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

  • Committer: Gerry Boland
  • Date: 2017-03-02 13:26:31 UTC
  • Revision ID: gerry.boland@canonical.com-20170302132631-ru7uhq5lj95rvufb
Cleanup: no need to pass MirSurface out in isBeingDisplayedChanged signal

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
    const auto surface = new MirSurface(window, m_windowController, session, parentSurface);
113
113
    rememberMirSurface(surface);
114
114
 
115
 
    connect(surface, &MirSurface::isBeingDisplayedChanged, this, [this](MirSurfaceInterface *surface) {
 
115
    connect(surface, &MirSurface::isBeingDisplayedChanged, this, [this, surface]() {
116
116
        if ((!surface->live() || !surface->session())
117
117
                && !surface->isBeingDisplayed()) {
118
118
            forgetMirSurface(static_cast<MirSurface*>(surface)->window());