From 0b3a971056b6f6c6327e70b1196dea8eefb07aa1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 18 May 2019 13:39:12 +0000 Subject: [PATCH] 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 cef737d647..8e5ef0cdbd 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; }