diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2014-12-04 22:17:58 -0500 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-12-11 07:57:31 +0100 |
commit | 2e512773095216acbac83e6fd71f6d0444263d70 (patch) | |
tree | bf17b3e97d8ee2448869b6bfa7ffce63f1397b72 /vcl/unx | |
parent | f0f5f50243810762e27f1207b3c08b60ed888ee3 (diff) |
vcl: Reset context when the backend window is destroyed
Conflicts:
vcl/source/opengl/OpenGLContext.cxx
Change-Id: Ie2b93de8efe5ea56b0420adf23639c0153103385
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 4d3c244e5f91..5656748b1279 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -34,6 +34,7 @@ #include "vcl/printerinfomanager.hxx" #include "vcl/settings.hxx" #include "vcl/bmpacc.hxx" +#include "vcl/opengl/OpenGLContext.hxx" #include <prex.h> #include <X11/Xatom.h> @@ -65,6 +66,7 @@ #include <sal/macros.h> #include <com/sun/star/uno/Exception.hpp> +#include "svdata.hxx" #include "svids.hrc" #include "impbmp.hxx" @@ -889,6 +891,15 @@ X11SalFrame::~X11SalFrame() delete pFreeGraphics_; } + // reset all OpenGL contexts using this window + OpenGLContext* pContext = ImplGetSVData()->maGDIData.mpLastContext; + while( pContext ) + { + if( pContext->getOpenGLWindow().win == mhWindow ) + pContext->reset(); + pContext = pContext->mpPrevContext; + } + XDestroyWindow( GetXDisplay(), mhWindow ); /* |