diff --git a/composite.cpp b/composite.cpp
index eddd663c96..bb00d5f77c 100644
--- a/composite.cpp
+++ b/composite.cpp
@@ -162,6 +162,7 @@ void Compositor::setup()
}
extern int screen_number; // main.cpp
+extern bool is_multihead;
void Compositor::slotCompositingOptionsInitialized()
{
@@ -182,7 +183,7 @@ void Compositor::slotCompositingOptionsInitialized()
// Some broken drivers crash on glXQuery() so to prevent constant KWin crashes:
KSharedConfigPtr unsafeConfigPtr = KGlobal::config();
KConfigGroup unsafeConfig(unsafeConfigPtr, "Compositing");
- const QString openGLIsUnsafe = "OpenGLIsUnsafe" + QString::number(screen_number);
+ const QString openGLIsUnsafe = "OpenGLIsUnsafe" + (is_multihead ? QString::number(screen_number) : "");
if (unsafeConfig.readEntry(openGLIsUnsafe, false))
kWarning(1212) << "KWin has detected that your OpenGL library is unsafe to use";
else {
diff --git a/compositingprefs.cpp b/compositingprefs.cpp
index 729c2f2b63..b79106c25b 100644
--- a/compositingprefs.cpp
+++ b/compositingprefs.cpp
@@ -38,6 +38,9 @@ along with this program. If not, see .
namespace KWin
{
+extern int screen_number; // main.cpp
+extern bool is_multihead;
+
CompositingPrefs::CompositingPrefs()
: mEnableDirectRendering(true)
{
@@ -49,15 +52,17 @@ CompositingPrefs::~CompositingPrefs()
bool CompositingPrefs::openGlIsBroken()
{
- return KConfigGroup(KGlobal::config(), "Compositing").readEntry("OpenGLIsUnsafe", false);
+ const QString unsafeKey("OpenGLIsUnsafe" + (is_multihead ? QString::number(screen_number) : ""));
+ return KConfigGroup(KGlobal::config(), "Compositing").readEntry(unsafeKey, false);
}
bool CompositingPrefs::compositingPossible()
{
// first off, check whether we figured that we'll crash on detection because of a buggy driver
KConfigGroup gl_workaround_group(KGlobal::config(), "Compositing");
+ const QString unsafeKey("OpenGLIsUnsafe" + (is_multihead ? QString::number(screen_number) : ""));
if (gl_workaround_group.readEntry("Backend", "OpenGL") == "OpenGL" &&
- gl_workaround_group.readEntry("OpenGLIsUnsafe", false))
+ gl_workaround_group.readEntry(unsafeKey, false))
return false;
if (!Xcb::Extensions::self()->isCompositeAvailable()) {
@@ -85,8 +90,9 @@ QString CompositingPrefs::compositingNotPossibleReason()
{
// first off, check whether we figured that we'll crash on detection because of a buggy driver
KConfigGroup gl_workaround_group(KGlobal::config(), "Compositing");
+ const QString unsafeKey("OpenGLIsUnsafe" + (is_multihead ? QString::number(screen_number) : ""));
if (gl_workaround_group.readEntry("Backend", "OpenGL") == "OpenGL" &&
- gl_workaround_group.readEntry("OpenGLIsUnsafe", false))
+ gl_workaround_group.readEntry(unsafeKey, false))
return i18n("OpenGL compositing (the default) has crashed KWin in the past.
"
"This was most likely due to a driver bug."
"
If you think that you have meanwhile upgraded to a stable driver,
"