Revision: 244 http://trac.macosforge.org/projects/xquartz/changeset/244 Author: gstaplin@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; }