From 701eb0a2f36d4e4242bda128bb664db43cabbd0b Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 20 Apr 2020 05:33:26 +0100 Subject: [PATCH] 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 --- src/opengl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/opengl.c b/src/opengl.c index 1e956be..40945cb 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -245,6 +245,7 @@ void glx_destroy(session_t *ps) { // Destroy GLX context if (ps->psglx->context) { + glXMakeCurrent(ps->dpy, None, NULL); glXDestroyContext(ps->dpy, ps->psglx->context); ps->psglx->context = NULL; }