fix GLX server resize/crash when resizing windows

This commit is contained in:
Brian Paul
2005-10-21 21:39:10 +00:00
parent 7d3b26022b
commit 52f686c480
3 changed files with 4 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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)