[gtk+] window: unrealize renderer before destroying GDK window



commit 8cb96dec7ee856afbd4d31d57a7860b58fa5d4db
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]