diff options
-rw-r--r-- | vcl/inc/opengl/zone.hxx | 6 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 21 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 3 |
3 files changed, 30 insertions, 0 deletions
diff --git a/vcl/inc/opengl/zone.hxx b/vcl/inc/opengl/zone.hxx index 65a7249b16b2..75ebad915b60 100644 --- a/vcl/inc/opengl/zone.hxx +++ b/vcl/inc/opengl/zone.hxx @@ -48,6 +48,12 @@ public: OpenGLVCLContextZone(); }; +class VCL_DLLPUBLIC PreDefaultWinNoOpenGLZone { +public: + PreDefaultWinNoOpenGLZone(); + ~PreDefaultWinNoOpenGLZone(); +}; + #endif // INCLUDED_VCL_INC_OPENGL_ZONE_H /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index f07e7dcbfa8e..e00a93aa4586 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -976,12 +976,28 @@ OpenGLVCLContextZone::OpenGLVCLContextZone() OpenGLContext::makeVCLCurrent(); } +namespace +{ + bool bTempOpenGLDisabled = false; +} + +PreDefaultWinNoOpenGLZone::PreDefaultWinNoOpenGLZone() +{ + bTempOpenGLDisabled = true; +} + +PreDefaultWinNoOpenGLZone::~PreDefaultWinNoOpenGLZone() +{ + bTempOpenGLDisabled = false; +} + bool OpenGLHelper::isVCLOpenGLEnabled() { /** * The !bSet part should only be called once! Changing the results in the same * run will mix OpenGL and normal rendering. */ + static bool bSet = false; static bool bEnable = false; static bool bForceOpenGL = false; @@ -990,6 +1006,11 @@ bool OpenGLHelper::isVCLOpenGLEnabled() if ( Application::IsConsoleOnly() ) return false; + //tdf#106155, disable GL while loading certain bitmaps needed for the initial toplevel windows + //under raw X (kde4) vclplug + if (bTempOpenGLDisabled) + return false; + if (bSet) { return bForceOpenGL || bEnable; diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index d0ce7021fe08..f71eecf239ea 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -57,6 +57,7 @@ #include "unx/i18n_keysym.hxx" #include "unx/i18n_status.hxx" #include <unx/x11/xlimits.hxx> +#include "opengl/zone.hxx" #include "unx/gensys.h" #include "sallayout.hxx" @@ -257,6 +258,8 @@ static bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, SalX11Screen nXScreen if( ! ImplGetResMgr() ) return false; + PreDefaultWinNoOpenGLZone aGuard; + CreateNetWmAppIcon( nIcon, netwm_icon ); sal_uInt16 nIconSizeOffset; |