opengl: release context in glx_destroy

GLX context is not destroyed immediately after calling
glXDestroyContext. It is only destroyed when it's no longer
being used. So make sure to release the context

Fixes #381

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2020-04-20 05:33:26 +01:00
parent 17831a7be3
commit 701eb0a2f3
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 1 additions and 0 deletions

View File

@ -245,6 +245,7 @@ void glx_destroy(session_t *ps) {
// Destroy GLX context // Destroy GLX context
if (ps->psglx->context) { if (ps->psglx->context) {
glXMakeCurrent(ps->dpy, None, NULL);
glXDestroyContext(ps->dpy, ps->psglx->context); glXDestroyContext(ps->dpy, ps->psglx->context);
ps->psglx->context = NULL; ps->psglx->context = NULL;
} }