[effects] Recreate shell client connections after compositor settings have been changed

Summary:
If the animation speed was changed, then EffectsHandler will be destroyed
and created again.

Because we don't create connections to monitor state of Wayland clients
in EffectsHandler constructor, effects like the Magic lamp won't work
after changing compositor settings.

BUG: 400240

Test Plan:
* Changed animation speed;
* Minimized a Wayland client.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16401
This commit is contained in:
Vlad Zagorodniy 2018-10-24 17:18:36 +03:00
parent 110fa039cb
commit 722af02153

View file

@ -254,6 +254,14 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotShellClientShown); connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotShellClientShown);
} }
); );
const auto clients = waylandServer()->clients();
for (ShellClient *c : clients) {
if (c->readyForPainting()) {
setupAbstractClientConnections(c);
} else {
connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotShellClientShown);
}
}
} }
reconfigure(); reconfigure();
} }