Commit 005377ef authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Unify code that setups client connections in EffectsHandlerImpl

Workspace::allClientList() returns all X11 and Wayland windows. So, we
don't need the two separate code paths.
parent 0f9722ad
......@@ -237,8 +237,12 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
}
// connect all clients
for (X11Client *c : ws->clientList()) {
setupClientConnections(c);
for (AbstractClient *client : ws->allClientList()) {
if (client->readyForPainting()) {
setupClientConnections(client);
} else {
connect(client, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotClientShown);
}
}
for (Unmanaged *u : ws->unmanagedList()) {
setupUnmanagedConnections(u);
......@@ -246,16 +250,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
for (InternalClient *client : ws->internalClients()) {
setupClientConnections(client);
}
if (waylandServer()) {
const auto clients = waylandServer()->clients();
for (AbstractClient *c : clients) {
if (c->readyForPainting()) {
setupClientConnections(c);
} else {
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotClientShown);
}
}
}
reconfigure();
}
......
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