summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glxcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11/glxcmds.c')
-rw-r--r--src/glx/x11/glxcmds.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index cd4aede74e4..d1c68dd02e1 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -50,7 +50,7 @@
#include <xcb/glx.h>
#endif
-static const char __glXGLXClientVendorName[] = "SGI";
+static const char __glXGLXClientVendorName[] = "Mesa Project and SGI";
static const char __glXGLXClientVersion[] = "1.4";
@@ -540,6 +540,16 @@ DestroyContext(Display * dpy, GLXContext gc)
imported = gc->imported;
gc->xid = None;
+ if (gc->currentDpy) {
+ /* This context is bound to some thread. According to the man page,
+ * we should not actually delete the context until it's unbound.
+ * Note that we set gc->xid = None above. In MakeContextCurrent()
+ * we check for that and delete the context there.
+ */
+ __glXUnlock();
+ return;
+ }
+
#ifdef GLX_DIRECT_RENDERING
/* Destroy the direct rendering context */
if (gc->driContext) {
@@ -2565,7 +2575,7 @@ glXAllocateMemoryMESA(Display * dpy, int scrn,
(void) readFreq;
(void) writeFreq;
(void) priority;
-#endif /* GLX_DIRECT_RENDERING */
+#endif /* __DRI_ALLOCATE */
return NULL;
}
@@ -2584,7 +2594,7 @@ glXFreeMemoryMESA(Display * dpy, int scrn, void *pointer)
(void) dpy;
(void) scrn;
(void) pointer;
-#endif /* GLX_DIRECT_RENDERING */
+#endif /* __DRI_ALLOCATE */
}