Commit 085c7781 authored by Martin Flöser's avatar Martin Flöser

[wayland] Create PlasmaWindow as child of AbstractClient

Ensures that the PlasmaWindow gets destroyed together with the window.
Note: when a ShellClient gets unmapped the PlasmaWindow does not yet
get destroyed. It should probably get destroyed and recreated on next
mapping.
parent b5b8dee8
......@@ -212,7 +212,7 @@ void WaylandServer::announceClientToWindowManagement(AbstractClient *c)
return;
}
using namespace KWayland::Server;
auto w = m_windowManagement->createWindow(m_windowManagement);
auto w = m_windowManagement->createWindow(c);
w->setTitle(c->caption());
w->setVirtualDesktop(c->isOnAllDesktops() ? 0 : c->desktop() - 1);
w->setActive(c->isActive());
......@@ -257,7 +257,6 @@ void WaylandServer::announceClientToWindowManagement(AbstractClient *c)
w->setThemedIconName(icon.name().isEmpty() ? QStringLiteral("xorg") : icon.name());
}
);
connect(c, &QObject::destroyed, w, &KWayland::Server::PlasmaWindowInterface::unmap);
connect(w, &PlasmaWindowInterface::closeRequested, c, [c] { c->closeWindow(); });
connect(w, &PlasmaWindowInterface::virtualDesktopRequested, c,
[c] (quint32 desktop) {
......
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