[gtk/wip/matthiasc/popup5: 117/120] window: Make unrealize work again



commit a5d11fbaf55f4d16214faa301a16e50de4a3de29
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 18 13:39:12 2019 +0000

    window: Make unrealize work again
    
    GtkWidgets unrealize accesses the frame clock
    of the surface, so we need to keep the surface
    in place until after we've chained up.

 gtk/gtkwindow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 4662448a88..5ecd0c9ea2 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5836,12 +5836,13 @@ gtk_window_unrealize (GtkWidget *widget)
   g_signal_handlers_disconnect_by_func (surface, surface_size_changed, widget);
   g_signal_handlers_disconnect_by_func (surface, surface_render, widget);
   g_signal_handlers_disconnect_by_func (surface, surface_event, widget);
+
+  GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget);
+
   gdk_surface_set_widget (surface, NULL);
   gdk_surface_destroy (surface);
   g_clear_object (&priv->surface);
 
-  GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget);
-
   priv->hardcoded_surface = NULL;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]