diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/glx/glxext.c | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
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 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)) |