summaryrefslogtreecommitdiff
path: root/glx/glxcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'glx/glxcmds.c')
-rw-r--r--glx/glxcmds.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index b8da04882..291774812 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -213,6 +213,13 @@ __glXdirectContextCreate(__GLXscreen * screen,
return context;
}
+void
+FlushContext(__GLXcontext * cx)
+{
+ glFlush();
+ cx->hasUnflushedCommands = GL_FALSE;
+}
+
/**
* Create a GL context with the given properties. This routine is used
* to implement \c glXCreateContext, \c glXCreateNewContext, and
@@ -402,7 +409,9 @@ __glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc)
&glxc, &err))
return err;
- FreeResourceByType(req->context, __glXContextRes, FALSE);
+ glxc->idExists = GL_FALSE;
+ if (!glxc->currentClient)
+ FreeResourceByType(req->context, __glXContextRes, FALSE);
return Success;
}