summaryrefslogtreecommitdiff
path: root/GL/glx/glxext.c
diff options
context:
space:
mode:
Diffstat (limited to 'GL/glx/glxext.c')
-rw-r--r--GL/glx/glxext.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c
index c09120c12..b35175ed2 100644
--- a/GL/glx/glxext.c
+++ b/GL/glx/glxext.c
@@ -62,6 +62,11 @@ xGLXSingleReply __glXReply;
static __GLXclientState *__glXClients[MAXCLIENTS + 1];
/*
+** Client that called into GLX dispatch.
+*/
+ClientPtr __pGlxClient;
+
+/*
** Forward declarations.
*/
static int __glXDispatch(ClientPtr);
@@ -167,10 +172,12 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
pGlxPixmap->idExists = False;
if (!pGlxPixmap->refcnt) {
+#ifdef XF86DRI
if (pGlxPixmap->pDamage) {
DamageUnregister (pGlxPixmap->pDraw, pGlxPixmap->pDamage);
DamageDestroy(pGlxPixmap->pDamage);
}
+#endif
/*
** The DestroyPixmap routine should decrement the refcount and free
** only if it's zero.
@@ -549,6 +556,8 @@ static int __glXDispatch(ClientPtr client)
GLboolean rendering = opcode <= X_GLXRenderLarge;
__glXleaveServer(rendering);
+ __pGlxClient = client;
+
retval = (*proc)(cl, (GLbyte *) stuff);
__glXenterServer(rendering);