From 150084884146a9870ae5f3135326df3de97e29c0 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 15 Nov 2005 14:42:48 +0000 Subject: [PATCH] destroy display->xid_ht as late as possible (right before XCloseDisplay) 2005-11-15 Michael Natterer * gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy display->xid_ht as late as possible (right before XCloseDisplay) because it still needs to be around when the display's screens are finalized. (#85715) --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ gdk/x11/gdkdisplay-x11.c | 6 +++--- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b160a594d..90ddf99ad3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-15 Michael Natterer + + * gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy + display->xid_ht as late as possible (right before XCloseDisplay) + because it still needs to be around when the display's screens are + finalized. (#85715) + 2005-11-14 Matthias Clasen * gtk/gtkselection.c (gtk_selection_data_set_uris): Don't diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6b160a594d..90ddf99ad3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2005-11-15 Michael Natterer + + * gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy + display->xid_ht as late as possible (right before XCloseDisplay) + because it still needs to be around when the display's screens are + finalized. (#85715) + 2005-11-14 Matthias Clasen * gtk/gtkselection.c (gtk_selection_data_set_uris): Don't diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index c3da587ddf..b69d6a211d 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -769,9 +769,6 @@ gdk_display_x11_finalize (GObject *object) g_slist_foreach (display_x11->event_types, (GFunc)g_free, NULL); g_slist_free (display_x11->event_types); - /* X ID hashtable */ - g_hash_table_destroy (display_x11->xid_ht); - /* input GdkDevice list */ /* FIXME need to write finalize fct */ g_list_foreach (display_x11->input_devices, (GFunc) g_object_unref, NULL); @@ -789,6 +786,9 @@ gdk_display_x11_finalize (GObject *object) g_free (display_x11->startup_notification_id); + /* X ID hashtable */ + g_hash_table_destroy (display_x11->xid_ht); + XCloseDisplay (display_x11->xdisplay); G_OBJECT_CLASS (parent_class)->finalize (object);