Release GtkApplication earlier

GtkWindow was only releasing the application in finalize, causing
problems for language bindings. Now we release it already in destroy
(and then again in finalize for good measure).

https://bugzilla.gnome.org/show_bug.cgi?id=638580
This commit is contained in:
Matthias Clasen 2011-01-03 13:11:55 -05:00
parent b673e5b1ee
commit 6a11c59290

View File

@ -4513,6 +4513,8 @@ gtk_window_destroy (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget);
GtkWindowPrivate *priv = window->priv;
gtk_window_release_application (window);
toplevel_list = g_slist_remove (toplevel_list, window);
if (priv->transient_parent)
@ -4520,7 +4522,7 @@ gtk_window_destroy (GtkWidget *widget)
/* frees the icons */
gtk_window_set_icon_list (window, NULL);
if (priv->has_user_ref_count)
{
priv->has_user_ref_count = FALSE;