mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
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:
parent
4772fc2d42
commit
9de7c9f595
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user