window: Unrealize renderer last

We want to unrealize the renderer only after all widgets have been
unrealized. Otherwise, the widgets cannot release rendering resources
like textures.
This commit is contained in:
Benjamin Otte 2016-11-15 06:43:47 +01:00
parent e253f408e3
commit 703d80eac0

View File

@ -7138,9 +7138,6 @@ gtk_window_unrealize (GtkWidget *widget)
GList *link;
gint i;
if (priv->renderer != NULL)
gsk_renderer_unrealize (priv->renderer);
/* On unrealize, we reset the size of the window such
* that we will re-apply the default sizing stuff
* next time we show the window.
@ -7192,6 +7189,9 @@ gtk_window_unrealize (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget);
priv->hardcoded_window = NULL;
if (priv->renderer != NULL)
gsk_renderer_unrealize (priv->renderer);
}
static void