[Xquartz-changes] [193] AppleSGLX/trunk/glxcurrent.c

source_changes at macosforge.org source_changes at macosforge.org
Thu Feb 19 20:01:50 PST 2009


Revision: 193
          http://trac.macosforge.org/projects/xquartz/changeset/193
Author:   gstaplin at apple.com
Date:     2009-02-19 20:01:49 -0800 (Thu, 19 Feb 2009)
Log Message:
-----------
Handle the old context differently in the case of MakeContextCurrent.

I forgot that the code returns &dummyContext if the pthread_get_specific
is NULL.  So the test was invalid.

We need a shared context test added to the test suite.

Modified Paths:
--------------
    AppleSGLX/trunk/glxcurrent.c

Modified: AppleSGLX/trunk/glxcurrent.c
===================================================================
--- AppleSGLX/trunk/glxcurrent.c	2009-02-20 03:56:39 UTC (rev 192)
+++ AppleSGLX/trunk/glxcurrent.c	2009-02-20 04:01:49 UTC (rev 193)
@@ -137,7 +137,9 @@
 {
     const GLXContext oldGC = __glXGetCurrentContext();
      
-    if(apple_glx_make_current_context(dpy, oldGC ? oldGC->apple : NULL, 
+    if(apple_glx_make_current_context(dpy, 
+				      (oldGC && oldGC != &dummyContext) ?
+				      oldGC->apple : NULL, 
 				      gc ? gc->apple : NULL,
 				      draw))
 	return GL_FALSE;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090219/68019409/attachment.html>


More information about the Xquartz-changes mailing list