Commit f5724b9a authored by Martin Flöser's avatar Martin Flöser

[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.
parent 183479fe
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment