diff --git a/wayland_server.cpp b/wayland_server.cpp index 0f4bda2ebd..e2e58e6ad2 100644 --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -87,6 +87,9 @@ void WaylandServer::init(const QByteArray &socketName) }; if (Toplevel *t = ws->findToplevel(check)) { t->setSurface(surface); + if (Client *c = dynamic_cast(t)) { + announceClientToWindowManagement(c); + } } } ); @@ -205,6 +208,9 @@ void WaylandServer::initWorkspace() void WaylandServer::announceClientToWindowManagement(AbstractClient *c) { + if (!c->surface()) { + return; + } auto w = m_windowManagement->createWindow(c); w->setTitle(c->caption()); w->setVirtualDesktop(c->isOnAllDesktops() ? 0 : c->desktop() - 1);