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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user