bypass compositing related checks and cofig reading if compositing is disabled to prevent segfaults in broken GL drivers
svn path=/trunk/KDE/kdebase/workspace/; revision=1056313
This commit is contained in:
parent
564843d76f
commit
a4300bbc4d
1 changed files with 12 additions and 2 deletions
14
options.cpp
14
options.cpp
|
@ -217,8 +217,10 @@ unsigned long Options::updateSettings()
|
||||||
// KDE4 this probably needs to be done manually in clients
|
// KDE4 this probably needs to be done manually in clients
|
||||||
|
|
||||||
// Driver-specific config detection
|
// Driver-specific config detection
|
||||||
|
// TODO: this is now a bit cumbersome.
|
||||||
|
// reloadCompositingSettings isn't use anywhere else, so the prefs should be allocated there
|
||||||
|
// and not passed as value
|
||||||
CompositingPrefs prefs;
|
CompositingPrefs prefs;
|
||||||
prefs.detect();
|
|
||||||
reloadCompositingSettings( prefs );
|
reloadCompositingSettings( prefs );
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
|
@ -230,7 +232,15 @@ void Options::reloadCompositingSettings(const CompositingPrefs& prefs)
|
||||||
KConfigGroup config(_config, "Compositing");
|
KConfigGroup config(_config, "Compositing");
|
||||||
|
|
||||||
// Compositing settings
|
// Compositing settings
|
||||||
useCompositing = config.readEntry("Enabled", prefs.enableCompositing());
|
useCompositing = config.readEntry("Enabled", true);
|
||||||
|
if (useCompositing)
|
||||||
|
{
|
||||||
|
prefs.detect();
|
||||||
|
useCompositing = prefs.enableCompositing();
|
||||||
|
}
|
||||||
|
if (!useCompositing)
|
||||||
|
return false;
|
||||||
|
|
||||||
QString compositingBackend = config.readEntry("Backend", "OpenGL");
|
QString compositingBackend = config.readEntry("Backend", "OpenGL");
|
||||||
if( compositingBackend == "XRender" )
|
if( compositingBackend == "XRender" )
|
||||||
compositingMode = XRenderCompositing;
|
compositingMode = XRenderCompositing;
|
||||||
|
|
Loading…
Reference in a new issue