@@ -83,7 +83,7 @@ void SurfaceManager::registerSurface(MirSurface *surface)
8383 this->onStateRequested(surface, state);
8484 });
8585
86− const QString persistentId = m_virtualKeyboard->persistentId();
86+ const QString persistentId = surface->persistentId();
8787 connect(surface, &QObject::destroyed, this, [=]() {
8888 this->onSurfaceDestroyed(surface, persistentId);
8989 });
@@ -225,7 +225,7 @@ void SurfaceManager::onStateRequested(MirSurface *surface, Mir::State state)
225225 DEBUG_MSG("("<<surface<<","<<state<<") ended");
226226}
227227
228−void SurfaceManager::onSurfaceDestroyed(const QString& persistentId, MirSurface *surface)
228+void SurfaceManager::onSurfaceDestroyed(MirSurface *surface, const QString& persistentId)
229229{
230230 m_surfaces.removeAll(surface);
231231 if (m_focusedSurface == surface) {