window: unrealize renderer before destroying GDK window

We need to unrealize the children manually for that to happen, but so it
goes.

The order is necessary because we want the renderer to still be alive
while children are unrealizing.
This commit is contained in:
Benjamin Otte 2016-11-23 08:25:42 +01:00 committed by Benjamin Otte
parent cb1a349d17
commit 8cb96dec7e

View File

@ -7186,12 +7186,16 @@ gtk_window_unrealize (GtkWidget *widget)
popover_unrealize (popover->widget, popover, window);
}
GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget);
priv->hardcoded_window = NULL;
gtk_container_forall (GTK_CONTAINER (widget),
(GtkCallback) gtk_widget_unrealize,
NULL);
if (priv->renderer != NULL)
gsk_renderer_unrealize (priv->renderer);
GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget);
priv->hardcoded_window = NULL;
}
static void