From a915739887477b28d924ecc8417ee107d125bd6c Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 6 Sep 2009 18:48:27 +0000 Subject: Switched to xorg-server-1.6.99.900.tar.gz --- xorg-server/glx/glxext.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'xorg-server/glx/glxext.c') diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c index ca1d2ec8d..19d70d495 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 #endif @@ -37,6 +36,7 @@ #include "glxserver.h" #include #include +#include #include "privates.h" #include #include "g_disptab.h" @@ -171,14 +171,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; + } + } } /* @@ -341,6 +347,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)) -- cgit v1.2.3