From acf4e9ce8e2c1a0c0235184ea7c8f12c31674414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 11 Jun 2007 14:35:09 +0000 Subject: [PATCH] Work around gcc-3.3.3's problem with resolving namespaced symbols. svn path=/trunk/KDE/kdebase/workspace/; revision=673984 --- lib/kwinglutils.h | 5 +---- lib/kwinglutils_funcs.h | 11 +++++++++++ scene_opengl.cpp | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/kwinglutils.h b/lib/kwinglutils.h index 58e03b13cb..54313e6db2 100644 --- a/lib/kwinglutils.h +++ b/lib/kwinglutils.h @@ -14,16 +14,13 @@ License. See the file "COPYING" for the exact licensing terms. #include // HAVE_OPENGL #ifdef HAVE_OPENGL -#include -#include -#include +#include #include #include #include -#include template< class K, class V > class QHash; diff --git a/lib/kwinglutils_funcs.h b/lib/kwinglutils_funcs.h index c81c4c6fc1..dab665b381 100644 --- a/lib/kwinglutils_funcs.h +++ b/lib/kwinglutils_funcs.h @@ -19,6 +19,17 @@ License. See the file "COPYING" for the exact licensing terms. #ifdef HAVE_OPENGL +// gcc-3.3.3 apparently cannot resolve KWin's namespaced versions properly, +// so hide possible global functions +#define glXQueryDrawable kwinhide_glXQueryDrawable + +#include +#include + +#undef glXQueryDrawable + +#include + namespace KWin { diff --git a/scene_opengl.cpp b/scene_opengl.cpp index ab4ed58a39..6e21a54ac6 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -766,8 +766,8 @@ void SceneOpenGL::Texture::discard() void SceneOpenGL::Texture::findTarget() { unsigned int new_target = 0; - if( tfp_mode && KWin::glXQueryDrawable && bound_glxpixmap != None ) - KWin::glXQueryDrawable( display(), bound_glxpixmap, GLX_TEXTURE_TARGET_EXT, &new_target ); + if( tfp_mode && glXQueryDrawable && bound_glxpixmap != None ) + glXQueryDrawable( display(), bound_glxpixmap, GLX_TEXTURE_TARGET_EXT, &new_target ); else { if( NPOTTextureSupported() ||