window: Clear the renderer un unrealize

We disconnect from the GDK window, so the renderer can't keep any useful
state.

Plus, we might be using an entirely different window next time we
realize (after a call to gtk_window_set_display() for example) that should
use a completely different renderer anyway.
This commit is contained in:
Benjamin Otte 2017-11-01 15:46:20 +01:00
parent 6b3d979196
commit 8059f9bb3a

View File

@ -6995,8 +6995,8 @@ gtk_window_unrealize (GtkWidget *widget)
(GtkCallback) gtk_widget_unrealize,
NULL);
if (priv->renderer != NULL)
gsk_renderer_unrealize (priv->renderer);
gsk_renderer_unrealize (priv->renderer);
g_clear_object (&priv->renderer);
GTK_WIDGET_CLASS (gtk_window_parent_class)->unrealize (widget);