diff --git a/src/compositor.cpp b/src/compositor.cpp index 21a988a225..27ce49e243 100644 --- a/src/compositor.cpp +++ b/src/compositor.cpp @@ -42,7 +42,6 @@ Compositor::Compositor(QObject *workspace) : QObject(workspace) { connect(options, &Options::configChanged, this, &Compositor::configChanged); - connect(options, &Options::animationSpeedChanged, this, &Compositor::configChanged); // 2 sec which should be enough to restart the compositor. static const int compositorLostMessageDelay = 2000; diff --git a/src/effects.cpp b/src/effects.cpp index e805d7b938..ba62a648e8 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -140,6 +140,8 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, WorkspaceScene *s QDBusConnection dbus = QDBusConnection::sessionBus(); dbus.registerObject(QStringLiteral("/Effects"), this); + connect(options, &Options::animationSpeedChanged, this, &EffectsHandlerImpl::reconfigureEffects); + Workspace *ws = Workspace::self(); VirtualDesktopManager *vds = VirtualDesktopManager::self(); connect(ws, &Workspace::showingDesktopChanged, this, [this](bool showing, bool animated) { @@ -1240,6 +1242,14 @@ void EffectsHandlerImpl::destroyEffect(Effect *effect) delete effect; } +void EffectsHandlerImpl::reconfigureEffects() +{ + makeOpenGLContextCurrent(); + for (const EffectPair &pair : loaded_effects) { + pair.second->reconfigure(Effect::ReconfigureAll); + } +} + void EffectsHandlerImpl::reconfigureEffect(const QString &name) { for (QList::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) { diff --git a/src/effects.h b/src/effects.h index 2785fbcddc..0078c39899 100644 --- a/src/effects.h +++ b/src/effects.h @@ -304,6 +304,7 @@ protected: private: void registerPropertyType(long atom, bool reg); void destroyEffect(Effect *effect); + void reconfigureEffects(); typedef QList EffectsList; typedef EffectsList::const_iterator EffectsIterator;