Options now longer provides list of effects to be loaded.
Instead, EffectsHandler itself loads the list of enabled effects (saved by the effects selector widget), also making use of their EnabledByDefault property, so if you haven't touched the config, you'll automatically get default effects. svn path=/trunk/KDE/kdebase/workspace/; revision=669036icc-effect-5.14.5
parent
041673bf86
commit
44b293211c
19
effects.cpp
19
effects.cpp
|
@ -40,6 +40,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(CompositingType type)
|
|||
: EffectsHandler(type)
|
||||
, keyboard_grab_effect( NULL )
|
||||
{
|
||||
reconfigure();
|
||||
}
|
||||
|
||||
EffectsHandlerImpl::~EffectsHandlerImpl()
|
||||
|
@ -52,6 +53,24 @@ EffectsHandlerImpl::~EffectsHandlerImpl()
|
|||
XDestroyWindow( display(), pos.second );
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::reconfigure()
|
||||
{
|
||||
KSharedConfig::Ptr _config = KGlobal::config();
|
||||
KConfigGroup conf(_config, "Plugins");
|
||||
|
||||
KService::List offers = KServiceTypeTrader::self()->query("KWin/Effect");
|
||||
foreach( KService::Ptr service, offers )
|
||||
{
|
||||
KPluginInfo plugininfo( service );
|
||||
plugininfo.load( &conf );
|
||||
|
||||
if( plugininfo.isPluginEnabled() )
|
||||
loadEffect( plugininfo.pluginName() );
|
||||
else
|
||||
unloadEffect( plugininfo.pluginName() );
|
||||
}
|
||||
}
|
||||
|
||||
// the idea is that effects call this function again which calls the next one
|
||||
void EffectsHandlerImpl::prePaintScreen( int* mask, QRegion* region, int time )
|
||||
{
|
||||
|
|
|
@ -84,6 +84,7 @@ class EffectsHandlerImpl : public EffectsHandler
|
|||
virtual void reserveElectricBorderSwitching( bool reserve );
|
||||
|
||||
virtual unsigned long xrenderBufferPicture();
|
||||
virtual void reconfigure();
|
||||
|
||||
// internal (used by kwin core or compositing code)
|
||||
void startPaint();
|
||||
|
|
|
@ -226,6 +226,7 @@ class KWIN_EXPORT EffectsHandler
|
|||
|
||||
CompositingType compositingType() const { return compositing_type; }
|
||||
virtual unsigned long xrenderBufferPicture() = 0;
|
||||
virtual void reconfigure() = 0;
|
||||
|
||||
|
||||
protected:
|
||||
|
|
|
@ -212,9 +212,6 @@ unsigned long Options::updateSettings()
|
|||
glDirect = config.readEntry("GLDirect", true );
|
||||
glVSync = config.readEntry("GLVSync", true );
|
||||
|
||||
config.changeGroup( "Effects" );
|
||||
defaultEffects = config.readEntry( "Load", QStringList() << "ShowFps" << "Fade" );
|
||||
|
||||
// Read button tooltip animation effect from kdeglobals
|
||||
// Since we want to allow users to enable window decoration tooltips
|
||||
// and not kstyle tooltips and vise-versa, we don't read the
|
||||
|
|
Loading…
Reference in New Issue