diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Library_vcl.mk | 8 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 18 | ||||
-rw-r--r-- | vcl/source/salmain/salmain.cxx | 2 |
3 files changed, 26 insertions, 2 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 39d99957883e..25b2e7f66be1 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -724,4 +724,12 @@ $(eval $(call gb_Library_add_nativeres,vcl,vcl/salsrc)) $(eval $(call gb_Library_use_package,vcl,postprocess_images)) endif +ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS))) +ifeq ($(USING_X11),TRUE) +$(eval $(call gb_Library_use_static_libraries,vcl,\ + glxtest \ +)) +endif +endif + # vim: set noet sw=4 ts=4: diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 60f023b7dc4c..1ea130942ba0 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -35,6 +35,7 @@ #include <bitmapwriteaccess.hxx> #include <watchdog.hxx> #include <vcl/skia/SkiaHelper.hxx> +#include <vcl/glxtestprocess.hxx> #if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID && !defined HAIKU #include <opengl/x11/X11DeviceInfo.hxx> @@ -903,11 +904,26 @@ PreDefaultWinNoOpenGLZone::~PreDefaultWinNoOpenGLZone() bTempOpenGLDisabled = false; } +static void reapGlxTest() +{ + // Reap the glxtest child, or it'll stay around as a zombie, + // as X11OpenGLDeviceInfo::GetData() will not get called. + static bool bTestReaped = false; + if(!bTestReaped) + { + reap_glxtest_process(); + bTestReaped = true; + } +} + bool OpenGLHelper::isVCLOpenGLEnabled() { // Skia always takes precedence if enabled if( SkiaHelper::isVCLSkiaEnabled()) + { + reapGlxTest(); return false; + } /** * The !bSet part should only be called once! Changing the results in the same @@ -965,6 +981,8 @@ bool OpenGLHelper::isVCLOpenGLEnabled() if (bRet) WatchdogThread::start(); + else + reapGlxTest(); CrashReporter::addKeyValue("UseOpenGL", OUString::boolean(bRet), CrashReporter::Write); diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx index d0771d236824..d03f6b2cd28b 100644 --- a/vcl/source/salmain/salmain.cxx +++ b/vcl/source/salmain/salmain.cxx @@ -27,9 +27,7 @@ #include <vcl/svmain.hxx> SAL_IMPLEMENT_MAIN() { -#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && HAVE_FEATURE_UI && !defined HAIKU fire_glxtest_process(); -#endif tools::extendApplicationEnvironment(); vclmain::createApplication(); return SVMain(); |