summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-11-03 11:08:24 -0500
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-11-10 07:58:55 +0100
commit5d236d981298df80cc8fefd09400c43d260940f2 (patch)
treeaf5e8dc4818303b202fc1cc48cbdc78062f6acf3 /vcl/source
parentcfe8443ba58c984060819dad5a9017c310f11763 (diff)
vcl: Get the OpenGL window size from the frame
Change-Id: Id1b62d1982e56ef073ebb4ab800356d4dee3d742
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 508bf0ba4f14..f1686e3f10a1 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -540,10 +540,10 @@ bool OpenGLContext::init(HDC hDC, HWND hWnd)
bool OpenGLContext::ImplInit()
{
SAL_INFO("vcl.opengl", "OpenGLContext::ImplInit----start");
- if(m_pWindow)
+ /*if(m_pWindow)
m_pWindow->setPosSizePixel(0,0,0,0);
m_aGLWin.Width = 0;
- m_aGLWin.Height = 0;
+ m_aGLWin.Height = 0;*/
#if defined( WNT )
#elif defined( MACOSX )
@@ -683,6 +683,11 @@ bool OpenGLContext::ImplInit()
m_aGLWin.GLExtensions = glGetString( GL_EXTENSIONS );
SAL_INFO("vcl.opengl", "available GL extensions: " << m_aGLWin.GLExtensions);
+ XWindowAttributes xWinAttr;
+ XGetWindowAttributes( m_aGLWin.dpy, m_aGLWin.win, &xWinAttr );
+ m_aGLWin.Width = xWinAttr.width;
+ m_aGLWin.Height = xWinAttr.height;
+
if( m_aGLWin.HasGLXExtension("GLX_SGI_swap_control" ) )
{
// enable vsync