gtkwindow: Free pointer foci on dispose

That means the whole hierarchy is getting destroyed, leaving those
behind incurs not only in a leak, but also on weak refs (and unintended
repick) to happen in the wrong moment.
This commit is contained in:
Carlos Garnacho 2017-07-19 18:13:47 +02:00
parent 4772fc2d42
commit 9de7c9f595

View File

@ -3237,6 +3237,9 @@ gtk_window_dispose (GObject *object)
GtkWindow *window = GTK_WINDOW (object);
GtkWindowPrivate *priv = window->priv;
g_list_free_full (priv->foci, (GDestroyNotify) gtk_pointer_focus_unref);
priv->foci = NULL;
gtk_window_set_focus (window, NULL);
gtk_window_set_default (window, NULL);
remove_attach_widget (window);