Add an advanced option to override kwin's compositing checks
(i.e. currently it allows to enable compositing even if self-check fails). Not recommended of course, and it's be still nice to get self-check work reliably. CCBUG: 170085 svn path=/trunk/KDE/kdebase/workspace/; revision=860196
This commit is contained in:
parent
8eedfa3456
commit
23724e35b2
5 changed files with 23 additions and 1 deletions
|
@ -50,6 +50,7 @@ KWinAdvancedCompositingOptions::KWinAdvancedCompositingOptions(QWidget* parent,
|
||||||
|
|
||||||
connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||||
connect(ui.windowThumbnails, SIGNAL(activated(int)), this, SLOT(changed()));
|
connect(ui.windowThumbnails, SIGNAL(activated(int)), this, SLOT(changed()));
|
||||||
|
connect(ui.disableChecks, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||||
connect(ui.glMode, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
connect(ui.glMode, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||||
connect(ui.glTextureFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
connect(ui.glTextureFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||||
connect(ui.glDirect, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
connect(ui.glDirect, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||||
|
@ -131,6 +132,7 @@ void KWinAdvancedCompositingOptions::load()
|
||||||
ui.windowThumbnails->setCurrentIndex( 2 );
|
ui.windowThumbnails->setCurrentIndex( 2 );
|
||||||
else // shown, or default
|
else // shown, or default
|
||||||
ui.windowThumbnails->setCurrentIndex( 1 );
|
ui.windowThumbnails->setCurrentIndex( 1 );
|
||||||
|
ui.disableChecks->setChecked( config.readEntry( "DisableChecks", false ));
|
||||||
|
|
||||||
QString glMode = config.readEntry("GLMode", "TFP");
|
QString glMode = config.readEntry("GLMode", "TFP");
|
||||||
ui.glMode->setCurrentIndex((glMode == "TFP") ? 0 : ((glMode == "SHM") ? 1 : 2));
|
ui.glMode->setCurrentIndex((glMode == "TFP") ? 0 : ((glMode == "SHM") ? 1 : 2));
|
||||||
|
@ -160,7 +162,8 @@ void KWinAdvancedCompositingOptions::save()
|
||||||
|| config.readEntry("GLMode", "TFP") != glModes[ui.glMode->currentIndex()]
|
|| config.readEntry("GLMode", "TFP") != glModes[ui.glMode->currentIndex()]
|
||||||
|| config.readEntry("GLDirect", mDefaultPrefs->enableDirectRendering())
|
|| config.readEntry("GLDirect", mDefaultPrefs->enableDirectRendering())
|
||||||
!= ui.glDirect->isChecked()
|
!= ui.glDirect->isChecked()
|
||||||
|| config.readEntry("GLVSync", mDefaultPrefs->enableVSync()) != ui.glVSync->isChecked())
|
|| config.readEntry("GLVSync", mDefaultPrefs->enableVSync()) != ui.glVSync->isChecked()
|
||||||
|
|| config.readEntry("DisableChecks", false ) != ui.disableChecks->isChecked())
|
||||||
{
|
{
|
||||||
showConfirm = true;
|
showConfirm = true;
|
||||||
}
|
}
|
||||||
|
@ -168,6 +171,7 @@ void KWinAdvancedCompositingOptions::save()
|
||||||
config.writeEntry("Backend", (ui.compositingType->currentIndex() == 0) ? "OpenGL" : "XRender");
|
config.writeEntry("Backend", (ui.compositingType->currentIndex() == 0) ? "OpenGL" : "XRender");
|
||||||
static const int hps[] = { 1 /*always*/, 3 /*shown*/, 0 /*never*/ };
|
static const int hps[] = { 1 /*always*/, 3 /*shown*/, 0 /*never*/ };
|
||||||
config.writeEntry("HiddenPreviews", hps[ ui.windowThumbnails->currentIndex() ] );
|
config.writeEntry("HiddenPreviews", hps[ ui.windowThumbnails->currentIndex() ] );
|
||||||
|
config.writeEntry("DisableChecks", ui.disableChecks->isChecked());
|
||||||
|
|
||||||
config.writeEntry("GLMode", glModes[ui.glMode->currentIndex()]);
|
config.writeEntry("GLMode", glModes[ui.glMode->currentIndex()]);
|
||||||
config.writeEntry("GLTextureFilter", ui.glTextureFilter->currentIndex());
|
config.writeEntry("GLTextureFilter", ui.glTextureFilter->currentIndex());
|
||||||
|
|
|
@ -65,6 +65,17 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="disableChecks" >
|
||||||
|
<property name="whatsThis" >
|
||||||
|
<string>Enabling this option allows compositing to be activated even if some of the internal checks fail. Doing so may make the whole desktop unusable and its use is not recommened. Use only if KWin refuses to activate compositing on a system that should be capable of compositing.
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Disable functionality checks</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="glGroup" >
|
<widget class="QGroupBox" name="glGroup" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
|
|
|
@ -211,6 +211,7 @@ void Options::reloadCompositingSettings(const CompositingPrefs& prefs)
|
||||||
compositingMode = XRenderCompositing;
|
compositingMode = XRenderCompositing;
|
||||||
else
|
else
|
||||||
compositingMode = OpenGLCompositing;
|
compositingMode = OpenGLCompositing;
|
||||||
|
disableCompositingChecks = config.readEntry("DisableChecks", false);
|
||||||
QString glmode = config.readEntry("GLMode", "TFP" ).toUpper();
|
QString glmode = config.readEntry("GLMode", "TFP" ).toUpper();
|
||||||
if( glmode == "TFP" )
|
if( glmode == "TFP" )
|
||||||
glMode = GLTFP;
|
glMode = GLTFP;
|
||||||
|
|
|
@ -295,6 +295,7 @@ class Options : public KDecorationOptions
|
||||||
CompositingType compositingMode;
|
CompositingType compositingMode;
|
||||||
HiddenPreviews hiddenPreviews;
|
HiddenPreviews hiddenPreviews;
|
||||||
bool unredirectFullscreen;
|
bool unredirectFullscreen;
|
||||||
|
bool disableCompositingChecks;
|
||||||
|
|
||||||
uint refreshRate;
|
uint refreshRate;
|
||||||
// This is for OpenGL mode
|
// This is for OpenGL mode
|
||||||
|
|
|
@ -696,6 +696,11 @@ bool SceneOpenGL::selfCheck()
|
||||||
wspace->hideOverlay();
|
wspace->hideOverlay();
|
||||||
if( ok )
|
if( ok )
|
||||||
kDebug( 1212 ) << "Compositing self-check passed.";
|
kDebug( 1212 ) << "Compositing self-check passed.";
|
||||||
|
if( !ok && options->disableCompositingChecks )
|
||||||
|
{
|
||||||
|
kWarning( 1212 ) << "Compositing checks disabled, proceeding regardless of self-check failure.";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue