summaryrefslogtreecommitdiff
path: root/gtk/gtkglarea.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2014-11-03 13:19:40 +0100
committerAlexander Larsson <alexl@redhat.com>2014-11-03 13:19:40 +0100
commit3656c21030eb26c2556dcaaf972903575c9de0ae (patch)
tree258352b0c59b7bcd1f24a96a0cbb2227157bf637 /gtk/gtkglarea.c
parent9930e6dcaaa334b92f1cfc7e798a0064ed9d0666 (diff)
downloadgtk+-3656c21030eb26c2556dcaaf972903575c9de0ae.tar.gz
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.
Diffstat (limited to 'gtk/gtkglarea.c')
-rw-r--r--gtk/gtkglarea.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index a0392b9dce..d0882b7e36 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;
}