[wayland] Unmap PlasmaWindowInterface instead of destroying it

The unmap triggers a destroy on client side and also triggers the
automatic cleanup of the PlasmaWindowInterface instance.
This commit is contained in:
Martin Gräßlin 2015-06-18 00:21:29 +02:00
parent 183479fe67
commit f5724b9a55

View file

@ -211,7 +211,7 @@ void WaylandServer::announceClientToWindowManagement(AbstractClient *c)
if (!c->surface()) {
return;
}
auto w = m_windowManagement->createWindow(c);
auto w = m_windowManagement->createWindow(m_windowManagement);
w->setTitle(c->caption());
w->setVirtualDesktop(c->isOnAllDesktops() ? 0 : c->desktop() - 1);
connect(c, &AbstractClient::captionChanged, w, [w, c] { w->setTitle(c->caption()); });
@ -223,6 +223,7 @@ void WaylandServer::announceClientToWindowManagement(AbstractClient *c)
w->setVirtualDesktop(c->desktop() - 1);
}
);
connect(c, &QObject::destroyed, w, &KWayland::Server::PlasmaWindowInterface::unmap);
}
void WaylandServer::initOutputs()