diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-06-19 21:49:37 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-06-19 21:49:37 +0000 |
commit | 775669f6efcc5c1ec5c6b1aa9db2b3a61d52824a (patch) | |
tree | 43bb21c38036b4fa5ae0cd4b9fc0cc03293a9423 | |
parent | 02c03ef6b4762adf33b73528c9fd672ef4697763 (diff) |
put XSync in get_buffer_size(), plus clean-up
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 13 |
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 56e63f3252..c10afede92 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.32 2002/06/15 02:38:17 brianp Exp $ */ +/* $Id: xm_dd.c,v 1.33 2002/06/19 21:49:37 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 */ |