Bah, do this properly. Avoid detecting compositing prefs only

if compositing is explicitly disabled. This allows disabling
it if there's a problem, and in that case the prefs don't matter
anyway, but it doesn't prevent detecting details about compositing
when it might be used.


svn path=/trunk/KDE/kdebase/workspace/; revision=1058282
This commit is contained in:
Luboš Luňák 2009-12-04 09:40:12 +00:00
parent 7cef1eadd5
commit bbd4deffe8

View file

@ -227,17 +227,16 @@ void Options::reloadCompositingSettings()
KSharedConfig::Ptr _config = KGlobal::config(); KSharedConfig::Ptr _config = KGlobal::config();
KConfigGroup config(_config, "Compositing"); KConfigGroup config(_config, "Compositing");
// do not even detect compositing preferences if explicitly disabled
if( config.hasKey( "Enabled" ) && !config.readEntry( "Enabled", true ))
{
useCompositing = false;
return;
}
// Compositing settings // Compositing settings
CompositingPrefs prefs; CompositingPrefs prefs;
if( !config.hasKey( "Enabled" ))
{
prefs.detect(); prefs.detect();
useCompositing = prefs.recommendCompositing(); useCompositing = config.readEntry( "Enabled" , prefs.recommendCompositing());
}
else
useCompositing = config.readEntry( "Enabled" , true );
if (!useCompositing)
return;
QString compositingBackend = config.readEntry("Backend", "OpenGL"); QString compositingBackend = config.readEntry("Backend", "OpenGL");
if( compositingBackend == "XRender" ) if( compositingBackend == "XRender" )