summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-12-04 22:17:58 -0500
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-11 07:57:31 +0100
commit2e512773095216acbac83e6fd71f6d0444263d70 (patch)
treebf17b3e97d8ee2448869b6bfa7ffce63f1397b72 /vcl/unx
parentf0f5f50243810762e27f1207b3c08b60ed888ee3 (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.cxx11
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 );
/*