[cairo-commit] glitz/src/glx glitz_glx_context.c, 1.10, 1.11 glitz_glx_drawable.c, 1.8, 1.9

David Reveman commit at pdx.freedesktop.org
Sun May 21 17:59:34 PDT 2006


Committed by: davidr

Update of /cvs/cairo/glitz/src/glx
In directory kemper:/tmp/cvs-serv30162/src/glx

Modified Files:
	glitz_glx_context.c glitz_glx_drawable.c 
Log Message:
Fix pbuffer resize issue

Index: glitz_glx_context.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glx_context.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- glitz_glx_context.c	13 Mar 2006 14:23:44 -0000	1.10
+++ glitz_glx_context.c	22 May 2006 00:59:33 -0000	1.11
@@ -442,15 +442,15 @@
 	    _glitz_glx_context_make_current (drawable, (context)? 1: 0);
 	break;
     case GLITZ_DRAWABLE_CURRENT:
-	if (!dinfo->thread_info->cctx)
-	    context = glXGetCurrentContext ();
-
 	if (drawable->base.width  != drawable->width ||
 	    drawable->base.height != drawable->height)
 	    _glitz_glx_drawable_update_size (drawable,
 					     drawable->base.width,
 					     drawable->base.height);
 
+	if (!dinfo->thread_info->cctx)
+	    context = glXGetCurrentContext ();
+
 	if ((context != drawable->context->context) ||
 	    (glXGetCurrentDrawable () != drawable->drawable))
 	    _glitz_glx_context_make_current (drawable, (context)? 1: 0);

Index: glitz_glx_drawable.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glx_drawable.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- glitz_glx_drawable.c	13 Mar 2006 14:23:44 -0000	1.8
+++ glitz_glx_drawable.c	22 May 2006 00:59:33 -0000	1.9
@@ -79,6 +79,10 @@
 {
     if (drawable->pbuffer)
     {
+	if (glXGetCurrentDrawable () == drawable->drawable)
+	    glXMakeCurrent (drawable->screen_info->display_info->display,
+			    None, NULL);
+
 	glitz_glx_pbuffer_destroy (drawable->screen_info, drawable->pbuffer);
 	drawable->drawable = drawable->pbuffer =
 	    glitz_glx_pbuffer_create (drawable->screen_info,



More information about the cairo-commit mailing list