aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxext.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxext.c')
-rw-r--r--xorg-server/glx/glxext.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index 1598e27a6..95f09d296 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -28,7 +28,6 @@
* Silicon Graphics, Inc.
*/
-#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#else
@@ -41,6 +40,7 @@
#include "glxserver.h"
#include <windowstr.h>
#include <propertyst.h>
+#include <registry.h>
#include "privates.h"
#include <os.h>
#include "g_disptab.h"
@@ -175,14 +175,20 @@ void __glXAddToContextList(__GLXcontext *cx)
glxAllContexts = cx;
}
-void __glXRemoveFromContextList(__GLXcontext *cx)
+static void __glXRemoveFromContextList(__GLXcontext *cx)
{
- __GLXcontext *c, **prev;
+ __GLXcontext *c, *prev;
- prev = &glxAllContexts;
- for (c = glxAllContexts; c; c = c->next)
- if (c == cx)
- *prev = c->next;
+ if (cx == glxAllContexts)
+ glxAllContexts = cx->next;
+ else {
+ prev = glxAllContexts;
+ for (c = glxAllContexts; c; c = c->next) {
+ if (c == cx)
+ prev->next = c->next;
+ prev = c;
+ }
+ }
}
/*
@@ -345,6 +351,10 @@ void GlxExtensionInit(void)
__glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone);
__glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone);
+ RegisterResourceName(__glXContextRes, "GLXContext");
+ RegisterResourceName(__glXDrawableRes, "GLXDrawable");
+ RegisterResourceName(__glXSwapBarrierRes, "GLXSwapBarrier");
+
if (!dixRequestPrivate(glxClientPrivateKey, sizeof (__GLXclientState)))
return;
if (!AddCallback (&ClientStateCallback, glxClientCallback, 0))