Only execute kwin_opengl_test if OpenGL/GLX is going to be used
* don't execute OpenGL test app if user selected XRender * don't execute OpenGL test app if user forces to EGL If a user selected XRender because OpenGL is failing badly it might not be the best idea to call an OpenGL application. If the user enforces EGL it's kind of pointless to call a testapp which uses GLX. REVIEW: 110659
This commit is contained in:
parent
2be7da70e0
commit
92bc318e45
2 changed files with 5 additions and 2 deletions
|
@ -139,7 +139,8 @@ void CompositingPrefs::detect()
|
||||||
#ifndef KWIN_HAVE_OPENGLES
|
#ifndef KWIN_HAVE_OPENGLES
|
||||||
// HACK: This is needed for AIGLX
|
// HACK: This is needed for AIGLX
|
||||||
const bool forceIndirect = qstrcmp(qgetenv("LIBGL_ALWAYS_INDIRECT"), "1") == 0;
|
const bool forceIndirect = qstrcmp(qgetenv("LIBGL_ALWAYS_INDIRECT"), "1") == 0;
|
||||||
if (!forceIndirect && qstrcmp(qgetenv("KWIN_DIRECT_GL"), "1") != 0) {
|
const bool forceEgl = qstrcmp(qgetenv("KWIN_OPENGL_INTERFACE"), "egl") == 0;
|
||||||
|
if (!forceIndirect && !forceEgl && qstrcmp(qgetenv("KWIN_DIRECT_GL"), "1") != 0) {
|
||||||
// Start an external helper program that initializes GLX and returns
|
// Start an external helper program that initializes GLX and returns
|
||||||
// 0 if we can use direct rendering, and 1 otherwise.
|
// 0 if we can use direct rendering, and 1 otherwise.
|
||||||
// The reason we have to use an external program is that after GLX
|
// The reason we have to use an external program is that after GLX
|
||||||
|
|
|
@ -949,7 +949,9 @@ void Options::reloadCompositingSettings(bool force)
|
||||||
|
|
||||||
// Compositing settings
|
// Compositing settings
|
||||||
CompositingPrefs prefs;
|
CompositingPrefs prefs;
|
||||||
|
if (compositingMode() == OpenGLCompositing) {
|
||||||
prefs.detect();
|
prefs.detect();
|
||||||
|
}
|
||||||
|
|
||||||
KSharedConfig::Ptr _config = KGlobal::config();
|
KSharedConfig::Ptr _config = KGlobal::config();
|
||||||
KConfigGroup config(_config, "Compositing");
|
KConfigGroup config(_config, "Compositing");
|
||||||
|
|
Loading…
Reference in a new issue