[gtk/wip/chergert/gdk-macos-gl-renderer: 18/26] macos: clear current context if necessary
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/gdk-macos-gl-renderer: 18/26] macos: clear current context if necessary
- Date: Thu, 29 Oct 2020 00:12:13 +0000 (UTC)
commit 4e69860c224e88bd73d99ff960f1b1b68c2d188d
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 27 19:22:27 2020 -0700
macos: clear current context if necessary
gdk/macos/gdkmacosglcontext.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c
index b5ba191751..830ad87d62 100644
--- a/gdk/macos/gdkmacosglcontext.c
+++ b/gdk/macos/gdkmacosglcontext.c
@@ -269,6 +269,9 @@ gdk_macos_gl_context_dispose (GObject *gobject)
{
NSOpenGLContext *gl_context = g_steal_pointer (&self->gl_context);
+ if (gl_context == [NSOpenGLContext currentContext])
+ [NSOpenGLContext clearCurrentContext];
+
[gl_context clearDrawable];
[gl_context release];
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]