[gtk+/wip/otte/gl-drawing: 15/15] window: unrealize renderer before destroying GDK window
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gl-drawing: 15/15] window: unrealize renderer before destroying GDK window
- Date: Wed, 23 Nov 2016 16:04:04 +0000 (UTC)
commit 338a53142f87e283d09db0e30d5d6bb7924313d2
Author: Benjamin Otte <otte redhat com>
Date: Wed Nov 23 08:25:42 2016 +0100
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.
gtk/gtkwindow.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 94720c3..8921369 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]