@ -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 < EffectPair > : : const_iterator it = loaded_effects . constBegin ( ) ; it ! = loaded_effects . constEnd ( ) ; + + it ) {