From 635d04486916e95089b28a3f92e69edbe3942698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 27 Mar 2014 12:04:25 +0100 Subject: [PATCH] [kwin] Reparse shared configuration before reconfiguring an Effect When the Effect has to be reconfigured the configuration most likely changed, thus we should reload it. Of course it would be possible to also do this in each Effect::reconfigureEffect, but this would mean that the configuration would be reloaded during startup, which we do not want. --- effects.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/effects.cpp b/effects.cpp index b847a03911..8099c18dea 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1656,6 +1656,8 @@ void EffectsHandlerImpl::reconfigureEffect(const QString& name) { for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) if ((*it).first == name) { + KSharedConfig::Ptr config = KSharedConfig::openConfig(QStringLiteral(KWIN_CONFIG)); + config->reparseConfiguration(); makeOpenGLContextCurrent(); (*it).second->reconfigure(Effect::ReconfigureAll); return;