From 38bb62c43da21a826f50d7f94db4cae7b51b01d4 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Sat, 13 Mar 2004 20:45:15 +0000 Subject: [PATCH] Remove the window from the toplevel_list here rather in destroy. While Sat Mar 13 15:19:17 2004 Owen Taylor * gtk/gtkwindow.c (gtk_window_destroy): Remove the window from the toplevel_list here rather in destroy. While this is theoretically speaking wrong, it fits in better with the current reality that destroyed widgets are not reusable. (#126808, Michael Natterer) --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkwindow.c | 4 ++-- 6 files changed, 42 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 486506e659..a63c1247f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sat Mar 13 15:19:17 2004 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_destroy): Remove + the window from the toplevel_list here rather in destroy. + While this is theoretically speaking wrong, it fits + in better with the current reality that destroyed + widgets are not reusable. (#126808, Michael Natterer) + Sat Mar 13 21:47:47 2004 Matthias Clasen * gtk/gtkcellview.c (gtk_cell_view_expose): Don't do anything diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 486506e659..a63c1247f4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Sat Mar 13 15:19:17 2004 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_destroy): Remove + the window from the toplevel_list here rather in destroy. + While this is theoretically speaking wrong, it fits + in better with the current reality that destroyed + widgets are not reusable. (#126808, Michael Natterer) + Sat Mar 13 21:47:47 2004 Matthias Clasen * gtk/gtkcellview.c (gtk_cell_view_expose): Don't do anything diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 486506e659..a63c1247f4 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Sat Mar 13 15:19:17 2004 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_destroy): Remove + the window from the toplevel_list here rather in destroy. + While this is theoretically speaking wrong, it fits + in better with the current reality that destroyed + widgets are not reusable. (#126808, Michael Natterer) + Sat Mar 13 21:47:47 2004 Matthias Clasen * gtk/gtkcellview.c (gtk_cell_view_expose): Don't do anything diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 486506e659..a63c1247f4 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Sat Mar 13 15:19:17 2004 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_destroy): Remove + the window from the toplevel_list here rather in destroy. + While this is theoretically speaking wrong, it fits + in better with the current reality that destroyed + widgets are not reusable. (#126808, Michael Natterer) + Sat Mar 13 21:47:47 2004 Matthias Clasen * gtk/gtkcellview.c (gtk_cell_view_expose): Don't do anything diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 486506e659..a63c1247f4 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Sat Mar 13 15:19:17 2004 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_destroy): Remove + the window from the toplevel_list here rather in destroy. + While this is theoretically speaking wrong, it fits + in better with the current reality that destroyed + widgets are not reusable. (#126808, Michael Natterer) + Sat Mar 13 21:47:47 2004 Matthias Clasen * gtk/gtkcellview.c (gtk_cell_view_expose): Don't do anything diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 83d8c1cb73..f80833d449 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -3500,6 +3500,8 @@ gtk_window_destroy (GtkObject *object) { GtkWindow *window = GTK_WINDOW (object); + toplevel_list = g_slist_remove (toplevel_list, window); + if (window->transient_parent) gtk_window_set_transient_for (window, NULL); @@ -3551,8 +3553,6 @@ gtk_window_finalize (GObject *object) { GtkWindow *window = GTK_WINDOW (object); - toplevel_list = g_slist_remove (toplevel_list, window); - g_free (window->title); g_free (window->wmclass_name); g_free (window->wmclass_class);