summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx21
1 files changed, 21 insertions, 0 deletions
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;