[Xquartz-changes] [244] AppleSGLX/trunk/glxcmds.c

source_changes at macosforge.org source_changes at macosforge.org
Sun Feb 22 16:35:28 PST 2009


Revision: 244
          http://trac.macosforge.org/projects/xquartz/changeset/244
Author:   gstaplin at apple.com
Date:     2009-02-22 16:35:28 -0800 (Sun, 22 Feb 2009)
Log Message:
-----------
Fix a bug in the CreateContext path that glXCreateNewContext calls.

The fbconfig path was wrong due to a lack of testing of glXCreateNewContext.

Also remove some LockDisplay/UnlockDisplay that were leftover from the old
XError handling code.

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

Modified: AppleSGLX/trunk/glxcmds.c
===================================================================
--- AppleSGLX/trunk/glxcmds.c	2009-02-23 00:33:30 UTC (rev 243)
+++ AppleSGLX/trunk/glxcmds.c	2009-02-23 00:35:28 UTC (rev 244)
@@ -377,9 +377,13 @@
     gc->xid = contextID;
     gc->imported = GL_FALSE;
 
-    LockDisplay(dpy);
-    mode = _gl_context_modes_find_visual(psc->visuals, vis->visualid);
-    
+    if(vis) {
+	mode = _gl_context_modes_find_visual(psc->visuals, vis->visualid);
+    } else {
+	mode = _gl_context_modes_find_fbconfig(psc->configs, 
+					       fbconfig->fbconfigID);
+    }
+
     if(NULL == mode) {
 	__glXSendError(dpy, BadValue, vis->visualid, X_GLXCreateContext,
 		       true);
@@ -402,8 +406,6 @@
     gc->mode = mode;
     gc->isDirect = allowDirect;
 
-    UnlockDisplay(dpy);
-       
     return gc;
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090222/82da2797/attachment.html>


More information about the Xquartz-changes mailing list