[gtk+] GtkGLArea: Don't dispose gl context on unrealize
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkGLArea: Don't dispose gl context on unrealize
- Date: Mon, 3 Nov 2014 16:41:03 +0000 (UTC)
commit 3656c21030eb26c2556dcaaf972903575c9de0ae
Author: Alexander Larsson <alexl redhat com>
Date: Mon Nov 3 13:19:40 2014 +0100
GtkGLArea: Don't dispose gl context on unrealize
This was done to ensure the context is not current, but this is
pretty broken for shared contexts. We now just make it non-current.
gtk/gtkglarea.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index a0392b9..d0882b7 100644
--- a/gtk/gtkglarea.c
+++ b/gtk/gtkglarea.c
@@ -524,7 +524,8 @@ gtk_gl_area_unrealize (GtkWidget *widget)
}
/* Make sure to destroy if current */
- g_object_run_dispose (G_OBJECT (priv->context));
+ if (priv->context == gdk_gl_context_get_current ())
+ gdk_gl_context_clear_current ();
g_object_unref (priv->context);
priv->context = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]