diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-10-21 21:39:10 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-10-21 21:39:10 +0000 |
commit | 52f686c48080cec9a26aa23d16bc14bd3d302d70 (patch) | |
tree | 910303a6eb32c78ef9d9cffc4c8d51f3996356da | |
parent | 7d3b26022b75608e2c9d83c14157b89ef39cbd43 (diff) |
fix GLX server resize/crash when resizing windows
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 1 | ||||
-rw-r--r-- | src/mesa/main/framebuffer.c | 3 | ||||
-rw-r--r-- | src/mesa/main/state.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 0bafad8e12..d0016b8692 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1108,7 +1108,6 @@ update_framebuffer_size(GLcontext *ctx) get_buffer_size(fb, &newWidth, &newHeight); if (newWidth != fb->Width || newHeight != fb->Height) { xmesa_resize_buffers(ctx, fb, newWidth, newHeight); - ctx->NewState |= _NEW_BUFFERS; /* to update scissor / window bounds */ } if (ctx->WinSysReadBuffer != ctx->WinSysDrawBuffer) { diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 479f762568..f2993b112b 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -224,6 +224,9 @@ _mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb, fb->Width = width; fb->Height = height; + + /* to update scissor / window bounds */ + ctx->NewState |= _NEW_BUFFERS; } diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 244cb485c6..6ade223fec 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -984,7 +984,7 @@ _mesa_update_state( GLcontext *ctx ) if (new_state & (_NEW_BUFFERS | _NEW_COLOR | _NEW_PIXEL)) _mesa_update_framebuffer(ctx); - if (new_state & (_NEW_SCISSOR|_NEW_BUFFERS)) + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) _mesa_update_draw_buffer_bounds( ctx ); if (new_state & _NEW_POINT) |