diff options
author | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
commit | a915739887477b28d924ecc8417ee107d125bd6c (patch) | |
tree | c02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/glx/glxext.c | |
parent | 6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff) | |
download | vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2 vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip |
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/glx/glxext.c')
-rw-r--r-- | xorg-server/glx/glxext.c | 24 |
1 files changed, 17 insertions, 7 deletions
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 <dix-config.h> #endif @@ -37,6 +36,7 @@ #include "glxserver.h" #include <windowstr.h> #include <propertyst.h> +#include <registry.h> #include "privates.h" #include <os.h> #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)) |