From 722af0215339e6555050fd50114ac4bf2fc921fe Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Wed, 24 Oct 2018 17:18:36 +0300 Subject: [PATCH] [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 --- effects.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/effects.cpp b/effects.cpp index 7761ca99df..5b573be3fb 100644 --- a/effects.cpp +++ b/effects.cpp @@ -254,6 +254,14 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene) 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(); }