@@ -108,9 +108,6 @@ void ApplicationInfo::createSurface()
108 m_closingSurfaces.removeAll(surface);
108 m_closingSurfaces.removeAll(surface);
111− connect(surface, &MirSurface::focusRequested, this, [this](){
112− Q_EMIT this->focusRequested();
114 connect(surface, &MirSurface::closeRequested, this, [this, surface](){
111 connect(surface, &MirSurface::closeRequested, this, [this, surface](){
115 m_closingSurfaces.append(surface);
112 m_closingSurfaces.append(surface);
116 if (m_state == Suspended) {
113 if (m_state == Suspended) {
@@ -367,3 +364,12 @@ void ApplicationInfo::onSurfaceCountChanged()
367 setState(Stopped);
364 setState(Stopped);
368+void ApplicationInfo::requestFocus()
370+ if (m_surfaceList.count() == 0) {
371+ Q_EMIT focusRequested();
373+ m_surfaceList.get(0)->requestFocus();