diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-04-07 13:10:01 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-04-07 14:46:03 +0200 |
commit | 43b8ee70fcedfb1a2c3ef996cea4842e06e020b0 (patch) | |
tree | 2869399399a370ac083b675d58e8b2772b14d5cd /vcl/source/opengl/OpenGLHelper.cxx | |
parent | f1c7aa5267a8045892890954df3c269a3abaab99 (diff) |
reap the glxtest child even if OpenGL is not used
E.g. with Skia enabled (thus blocking OpenGL) the zombie stays around.
Change-Id: I9769ec804e4727189bbfe58d415e8ad3a6b234ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91811
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/source/opengl/OpenGLHelper.cxx')
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
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); |