From fcd8cf3adaa4153c0da6e5245db8e8073fe824bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 12 Jan 2015 08:46:39 +0100 Subject: [PATCH] [glxbackend] Introduce env variable KWIN_USE_INTEL_SWAP_EVENT The feature is pretty much untested as it depends on Qt 5.4 and this was not a requirement during the development of 5.2. On the other hand regressions in this feature are very severe as it can freeze the screen and by that render the system unusable. This change disables the feature by default. To enable it use the environment variable KWIN_USE_INTEL_SWAP_EVENT=1. CCBUG: 342582 REVIEW: 122008 --- glxbackend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glxbackend.cpp b/glxbackend.cpp index 78efa4ebc3..c97fbee474 100644 --- a/glxbackend.cpp +++ b/glxbackend.cpp @@ -183,7 +183,9 @@ void GlxBackend::init() m_haveMESASwapControl = hasGLExtension(QByteArrayLiteral("GLX_MESA_swap_control")); m_haveEXTSwapControl = hasGLExtension(QByteArrayLiteral("GLX_EXT_swap_control")); m_haveSGISwapControl = hasGLExtension(QByteArrayLiteral("GLX_SGI_swap_control")); - m_haveINTELSwapEvent = hasGLExtension(QByteArrayLiteral("GLX_INTEL_swap_event")); + // only enable Intel swap event if env variable is set, see BUG 342582 + m_haveINTELSwapEvent = hasGLExtension(QByteArrayLiteral("GLX_INTEL_swap_event")) + && qgetenv("KWIN_USE_INTEL_SWAP_EVENT") == QByteArrayLiteral("1"); if (m_haveINTELSwapEvent) { const QList tokens = QByteArray(qVersion()).split('.');