From bbd4deffe860dc471435f6abb988577b210cff13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Fri, 4 Dec 2009 09:40:12 +0000 Subject: [PATCH] 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 --- options.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/options.cpp b/options.cpp index 5209586697..6288ccd735 100644 --- a/options.cpp +++ b/options.cpp @@ -227,17 +227,16 @@ void Options::reloadCompositingSettings() KSharedConfig::Ptr _config = KGlobal::config(); 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 CompositingPrefs prefs; - if( !config.hasKey( "Enabled" )) - { - prefs.detect(); - useCompositing = prefs.recommendCompositing(); - } - else - useCompositing = config.readEntry( "Enabled" , true ); - if (!useCompositing) - return; + prefs.detect(); + useCompositing = config.readEntry( "Enabled" , prefs.recommendCompositing()); QString compositingBackend = config.readEntry("Backend", "OpenGL"); if( compositingBackend == "XRender" )