vcl/inc/opengl/zone.hxx | 6 ++++++ vcl/source/opengl/OpenGLHelper.cxx | 21 +++++++++++++++++++++ vcl/unx/generic/window/salframe.cxx | 3 +++ 3 files changed, 30 insertions(+)
New commits: commit b96c52baa6b9607d9a31cd1b34162e4ee041f9b6 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Mar 28 14:15:37 2017 +0100 Resolves: tdf#106155 avoid opengl for toplevel X window icons because an opengl context requires a toplevel window so it recurses to death. Only the gen/kde4 vclplugs are affected here Change-Id: If5396d183d90d1872931b170dc90c3a70d8ea6b6 (cherry picked from commit b012e83e1cd09a0b6f9ede94a5c2d72d24459ce4) Reviewed-on: https://gerrit.libreoffice.org/35803 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> 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;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits