[wayland] Delay WaylandServer::shellClientAdded till the Surface is ready for painting

This simplifies the interaction: we know that the Surface is useable if
it got announced to the Workspace.
This commit is contained in:
Martin Gräßlin 2015-05-21 11:20:48 +02:00
parent aff93b1216
commit 783afd17b7

View file

@ -121,7 +121,15 @@ void WaylandServer::init(const QByteArray &socketName)
} else { } else {
m_clients << client; m_clients << client;
} }
if (client->readyForPainting()) {
emit shellClientAdded(client); emit shellClientAdded(client);
} else {
connect(client, &ShellClient::windowShown, this,
[this, client] {
emit shellClientAdded(client);
}
);
}
} }
); );
m_display->createShm(); m_display->createShm();