[gtk/wip/ebassi/gdk-egl-x11] Unset the current EGL context if we're disposing it
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/ebassi/gdk-egl-x11] Unset the current EGL context if we're disposing it
- Date: Thu, 18 Jul 2019 18:13:37 +0000 (UTC)
commit 76a0ac4b0c01c057884ddf67ef274a74d42efb9b
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jul 18 18:53:26 2019 +0100
Unset the current EGL context if we're disposing it
The condition of the check should be reversed: if the context in the
process of being disposed is the currently set one then we should unset
it.
gdk/x11/gdkglcontext-x11-eglx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gdk/x11/gdkglcontext-x11-eglx.c b/gdk/x11/gdkglcontext-x11-eglx.c
index ad9b61378a..dd369c0831 100644
--- a/gdk/x11/gdkglcontext-x11-eglx.c
+++ b/gdk/x11/gdkglcontext-x11-eglx.c
@@ -554,7 +554,8 @@ gdk_x11_gl_context_dispose (GObject *gobject)
GdkGLContext *context = GDK_GL_CONTEXT (gobject);
GdkDisplay *display = gdk_gl_context_get_display (context);
- if (eglGetCurrentContext () != context_x11->egl_context)
+ /* Unset the current context if we're disposing it */
+ if (eglGetCurrentContext () == context_x11->egl_context)
eglMakeCurrent (gdk_x11_display_get_egl_display (display),
EGL_NO_SURFACE,
EGL_NO_SURFACE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]