diff --git a/compositingprefs.cpp b/compositingprefs.cpp index 2341f13337..7e9fd2f463 100644 --- a/compositingprefs.cpp +++ b/compositingprefs.cpp @@ -119,6 +119,7 @@ void CompositingPrefs::detect() } #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES // HACK: This is needed for AIGLX if( qstrcmp( qgetenv( "KWIN_DIRECT_GL" ), "1" ) != 0 ) { @@ -160,12 +161,14 @@ void CompositingPrefs::detect() else glXMakeCurrent( display(), olddrawable, oldcontext ); deleteGLXContext(); +#endif #endif } bool CompositingPrefs::initGLXContext() { #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES mGLContext = NULL; KXErrorHandler handler; // Most of this code has been taken from glxinfo.c @@ -209,6 +212,9 @@ bool CompositingPrefs::initGLXContext() visinfo->visual, mask, &attr ); return glXMakeCurrent( display(), mGLWindow, mGLContext ) && !handler.error( true ); +#else + return false; +#endif #else return false; #endif @@ -217,11 +223,13 @@ bool CompositingPrefs::initGLXContext() void CompositingPrefs::deleteGLXContext() { #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES if( mGLContext == NULL ) return; glXDestroyContext( display(), mGLContext ); XDestroyWindow( display(), mGLWindow ); #endif +#endif } void CompositingPrefs::detectDriverAndVersion() diff --git a/compositingprefs.h b/compositingprefs.h index 2f857d18c6..bbaaa5a828 100644 --- a/compositingprefs.h +++ b/compositingprefs.h @@ -67,9 +67,11 @@ private: bool mStrictBinding; #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES GLXContext mGLContext; Window mGLWindow; #endif +#endif }; }