diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-17 08:57:46 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-17 09:33:10 +0000 |
commit | 2f57632672fa2cd21c9b0113e7a5f8bd033157c4 (patch) | |
tree | 744f48bab8bf6ab122ea25633129581a656b9158 /vcl/source | |
parent | d19cb7f5974216d3c52f758f00557a001dd1bd40 (diff) |
Force disable OpenGL in Safe Mode
Change-Id: I3f19231d9a9168499d9f9ed970d4da1a69cca36a
Reviewed-on: https://gerrit.libreoffice.org/29959
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/svapp.cxx | 12 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index b394c5302f5f..e1336ab086ff 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1646,6 +1646,18 @@ void Application::EnableEventTestingMode() bEventTestingMode = true; } +static bool bSafeMode = false; + +bool Application::IsSafeModeEnabled() +{ + return bSafeMode; +} + +void Application::EnableSafeMode() +{ + bSafeMode = true; +} + void Application::ShowNativeErrorBox(const OUString& sTitle , const OUString& sMessage) { diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 45f8f7684df2..f07e7dcbfa8e 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -1024,6 +1024,10 @@ bool OpenGLHelper::isVCLOpenGLEnabled() else if (officecfg::Office::Common::VCL::UseOpenGL::get()) bEnable = true; + // Force disable in safe mode + if (Application::IsSafeModeEnabled()) + bEnable = false; + bRet = bEnable; } |