summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-06-19 21:50:14 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-06-19 21:50:14 +0000
commit972cc7827f040210c0b7b91275f6b0ec97281aff (patch)
treed9217619660b99cda89061c6fa8482fa9fca43b7 /src
parent263d8ff8e30e340e786fe5a2bdcc7b808f112318 (diff)
put XSync in get_buffer_size(), plus clean-up
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 0bf01aee75..43bb614ab8 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -1,4 +1,4 @@
-/* $Id: xm_dd.c,v 1.26.2.6 2002/06/14 03:49:10 brianp Exp $ */
+/* $Id: xm_dd.c,v 1.26.2.7 2002/06/19 21:50:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -61,19 +61,20 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
*/
const XMesaBuffer xmBuffer = (XMesaBuffer) buffer;
unsigned int winwidth, winheight;
-#ifndef XFree86Server
+#ifdef XFree86Server
+ /* XFree86 GLX renderer */
+ winwidth = xmBuffer->frontbuffer->width;
+ winheight = xmBuffer->frontbuffer->height;
+#else
Window root;
int winx, winy;
unsigned int bw, d;
_glthread_LOCK_MUTEX(_xmesa_lock);
+ XSync(xmBuffer->xm_visual->display, 0); /* added for Chromium */
XGetGeometry( xmBuffer->xm_visual->display, xmBuffer->frontbuffer, &root,
&winx, &winy, &winwidth, &winheight, &bw, &d );
_glthread_UNLOCK_MUTEX(_xmesa_lock);
-#else
- /* XFree86 GLX renderer */
- winwidth = xmBuffer->frontbuffer->width;
- winheight = xmBuffer->frontbuffer->height;
#endif
(void)kernel8; /* Muffle compiler */