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.
This commit is contained in:
parent
0f9722ad69
commit
005377eff7
1 changed files with 7 additions and 12 deletions
19
effects.cpp
19
effects.cpp
|
@ -237,8 +237,12 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect all clients
|
// connect all clients
|
||||||
for (X11Client *c : ws->clientList()) {
|
for (AbstractClient *client : ws->allClientList()) {
|
||||||
setupClientConnections(c);
|
if (client->readyForPainting()) {
|
||||||
|
setupClientConnections(client);
|
||||||
|
} else {
|
||||||
|
connect(client, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotClientShown);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (Unmanaged *u : ws->unmanagedList()) {
|
for (Unmanaged *u : ws->unmanagedList()) {
|
||||||
setupUnmanagedConnections(u);
|
setupUnmanagedConnections(u);
|
||||||
|
@ -246,16 +250,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
for (InternalClient *client : ws->internalClients()) {
|
for (InternalClient *client : ws->internalClients()) {
|
||||||
setupClientConnections(client);
|
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();
|
reconfigure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue