summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-11-20 09:45:16 +0000
committerMichael Meeks <michael.meeks@collabora.com>2014-11-20 09:56:48 +0000
commit9557ae7baf3683a3c55bc55934fefba22a7c5759 (patch)
tree6b0a76f22b593b8f2e517492603f832f716e3d79 /vcl/unx/generic/gdi
parentf12e8ff594f177f22ffb3d1849bf768ab08023bf (diff)
vcl: update the OpenGLContext's pixmap when re-sizing a VirtualDevice.
Change-Id: Iee8089fc3bfbea60adee95dfb2c229f3efea28f8
Diffstat (limited to 'vcl/unx/generic/gdi')
-rw-r--r--vcl/unx/generic/gdi/salvd.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index 8e08cc2019fa..71ec509d1a2b 100644
--- a/vcl/unx/generic/gdi/salvd.cxx
+++ b/vcl/unx/generic/gdi/salvd.cxx
@@ -196,6 +196,8 @@ SalGraphics* X11SalVirtualDevice::AcquireGraphics()
void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* )
{ bGraphics_ = false; }
+#include "opengl/x11/gdiimpl.hxx"
+
bool X11SalVirtualDevice::SetSize( long nDX, long nDY )
{
if( bExternPixmap_ )
@@ -229,8 +231,15 @@ bool X11SalVirtualDevice::SetSize( long nDX, long nDY )
nDY_ = nDY;
if( pGraphics_ )
+ {
InitGraphics( this );
+ // re-initialize OpenGLContext [!] having freed it's underlying pixmap above
+ X11OpenGLSalGraphicsImpl *pImpl = dynamic_cast< X11OpenGLSalGraphicsImpl* >(pGraphics_->GetImpl());
+ if( pImpl )
+ pImpl->Init();
+ }
+
return true;
}