mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 07:04:29 +00:00
window: Remove popovers on dispose() before unsetting focus.
The popovers may return keyboard grabs to previous widgets, so if called after unsetting the focus, the window may be left with a dangling GtkWidget that would cause crash at later dispose() calls.
This commit is contained in:
parent
d105a3a36a
commit
a3b3b4621c
@ -2664,13 +2664,13 @@ gtk_window_dispose (GObject *object)
|
||||
GtkWindow *window = GTK_WINDOW (object);
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
|
||||
g_hash_table_remove_all (priv->popovers);
|
||||
|
||||
gtk_window_set_focus (window, NULL);
|
||||
gtk_window_set_default (window, NULL);
|
||||
unset_titlebar (window);
|
||||
remove_attach_widget (window);
|
||||
|
||||
g_hash_table_remove_all (priv->popovers);
|
||||
|
||||
G_OBJECT_CLASS (gtk_window_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user