diff --git a/kcmkwin/kwincompositing/advanced.cpp b/kcmkwin/kwincompositing/advanced.cpp index d119388682..ea53093eb9 100644 --- a/kcmkwin/kwincompositing/advanced.cpp +++ b/kcmkwin/kwincompositing/advanced.cpp @@ -50,6 +50,7 @@ KWinAdvancedCompositingOptions::KWinAdvancedCompositingOptions(QWidget* parent, connect(ui.compositingType, SIGNAL(currentIndexChanged(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.glTextureFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); connect(ui.glDirect, SIGNAL(toggled(bool)), this, SLOT(changed())); @@ -131,6 +132,7 @@ void KWinAdvancedCompositingOptions::load() ui.windowThumbnails->setCurrentIndex( 2 ); else // shown, or default ui.windowThumbnails->setCurrentIndex( 1 ); + ui.disableChecks->setChecked( config.readEntry( "DisableChecks", false )); QString glMode = config.readEntry("GLMode", "TFP"); 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("GLDirect", mDefaultPrefs->enableDirectRendering()) != 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; } @@ -168,6 +171,7 @@ void KWinAdvancedCompositingOptions::save() config.writeEntry("Backend", (ui.compositingType->currentIndex() == 0) ? "OpenGL" : "XRender"); static const int hps[] = { 1 /*always*/, 3 /*shown*/, 0 /*never*/ }; config.writeEntry("HiddenPreviews", hps[ ui.windowThumbnails->currentIndex() ] ); + config.writeEntry("DisableChecks", ui.disableChecks->isChecked()); config.writeEntry("GLMode", glModes[ui.glMode->currentIndex()]); config.writeEntry("GLTextureFilter", ui.glTextureFilter->currentIndex()); diff --git a/kcmkwin/kwincompositing/advanced.ui b/kcmkwin/kwincompositing/advanced.ui index fc81711c10..bb2956b041 100644 --- a/kcmkwin/kwincompositing/advanced.ui +++ b/kcmkwin/kwincompositing/advanced.ui @@ -65,6 +65,17 @@ + + + + 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. + + + + Disable functionality checks + + + diff --git a/options.cpp b/options.cpp index b092b98707..d6b71183eb 100644 --- a/options.cpp +++ b/options.cpp @@ -211,6 +211,7 @@ void Options::reloadCompositingSettings(const CompositingPrefs& prefs) compositingMode = XRenderCompositing; else compositingMode = OpenGLCompositing; + disableCompositingChecks = config.readEntry("DisableChecks", false); QString glmode = config.readEntry("GLMode", "TFP" ).toUpper(); if( glmode == "TFP" ) glMode = GLTFP; diff --git a/options.h b/options.h index e31885c668..c7bcd5f21b 100644 --- a/options.h +++ b/options.h @@ -295,6 +295,7 @@ class Options : public KDecorationOptions CompositingType compositingMode; HiddenPreviews hiddenPreviews; bool unredirectFullscreen; + bool disableCompositingChecks; uint refreshRate; // This is for OpenGL mode diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 0c2de9c42d..2b3cedbc5d 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -696,6 +696,11 @@ bool SceneOpenGL::selfCheck() wspace->hideOverlay(); if( ok ) 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; }