[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.
This commit is contained in:
Martin Gräßlin 2014-03-27 12:04:25 +01:00
parent bef2764c8f
commit 635d044869

View file

@ -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;