summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2003-01-16 19:10:46 +0000
committerAlan Hourihane <[email protected]>2003-01-16 19:10:46 +0000
commit5e9dd0407719be20b119259a3f4aeae1a0a1c8c1 (patch)
tree6c0ca7c190ede5cd615656e9b76dae2eb85e070f /src/mesa/drivers
parent1596bf398cdb4f791467ac89787f1268661af985 (diff)
fix for framebuffer width and height when window hasn't been realized.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index c0a71ff4b1e..0d29481e321 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.41 2002/10/30 20:24:47 brianp Exp $ */
+/* $Id: xm_dd.c,v 1.42 2003/01/16 19:10:46 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -64,8 +64,14 @@ get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
unsigned int winwidth, winheight;
#ifdef XFree86Server
/* XFree86 GLX renderer */
- winwidth = xmBuffer->frontbuffer->width;
- winheight = xmBuffer->frontbuffer->height;
+ if (xmBuffer->frontbuffer->width > MAX_WIDTH ||
+ xmBuffer->frontbuffer->height > MAX_HEIGHT) {
+ winwidth = buffer->Width;
+ winheight = buffer->Height;
+ } else {
+ winwidth = xmBuffer->frontbuffer->width;
+ winheight = xmBuffer->frontbuffer->height;
+ }
#else
Window root;
int winx, winy;