? ChangeLog.screwedup
? gdk/foo.txt
? gdk-pixbuf/core.9012
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.4720
diff -u -p -u -r1.4720 ChangeLog
--- ChangeLog	16 Dec 2003 00:56:42 -0000	1.4720
+++ ChangeLog	16 Dec 2003 16:12:51 -0000
@@ -1,3 +1,17 @@
+2003-12-16  Michael Meeks  <michael@ximian.com>
+
+	* gdk/x11/gdkevents-x11.c
+	(_gdk_x11_events_uninit_screen): double free fix.
+
+	* gdk/x11/gdkscreen-x11.c (gdk_screen_x11_finalize):
+	remove unref of root_window NULL'd in dispose.
+	(gdk_screen_x11_dispose): kill double colormap unref
+
+	* gdk/x11/gdkdisplay-x11.c
+	(gdk_display_x11_finalize): move XCloseDisplay to the
+	finalize - after the last use of xdisplay; where it
+	will only happen once cf. gdk_display_close.
+
 Tue Dec 16 01:46:46 2003  Matthias Clasen  <maclas@gmx.de>
 
 	Do not interpret distant clicks as double-clicks  (#116541,
Index: gdk/x11/gdkdisplay-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkdisplay-x11.c,v
retrieving revision 1.39
diff -u -p -u -r1.39 gdkdisplay-x11.c
--- gdk/x11/gdkdisplay-x11.c	9 Dec 2003 23:12:53 -0000	1.39
+++ gdk/x11/gdkdisplay-x11.c	16 Dec 2003 16:12:52 -0000
@@ -646,14 +646,13 @@ gdk_display_x11_dispose (GObject *object
   gint i;
   
   display_x11 = GDK_DISPLAY_X11 (object);
-  
-  for (i = 0; i < ScreenCount (display_x11->xdisplay); i++)
-    _gdk_screen_close (display_x11->screens[i]);
 
-  g_source_destroy (display_x11->event_source);
+  for (i = 0; i < ScreenCount (display_x11->xdisplay); i++)
+      _gdk_screen_close (display_x11->screens[i]);
 
-  XCloseDisplay (display_x11->xdisplay);
-  display_x11->xdisplay = NULL;
+  if (display_x11->event_source)
+    g_source_destroy (display_x11->event_source);
+  display_x11->event_source = NULL;
 
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }
@@ -701,6 +700,8 @@ gdk_display_x11_finalize (GObject *objec
     g_object_unref (display_x11->screens[i]);
   g_free (display_x11->screens);
   g_free (display_x11->startup_notification_id);
+
+  XCloseDisplay (display_x11->xdisplay);
   
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
Index: gdk/x11/gdkevents-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkevents-x11.c,v
retrieving revision 1.121
diff -u -p -u -r1.121 gdkevents-x11.c
--- gdk/x11/gdkevents-x11.c	16 Dec 2003 00:56:48 -0000	1.121
+++ gdk/x11/gdkevents-x11.c	16 Dec 2003 16:12:52 -0000
@@ -166,7 +166,8 @@ _gdk_x11_events_uninit_screen (GdkScreen
 {
   GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
 
-  xsettings_client_destroy (screen_x11->xsettings_client);
+  if (screen_x11->xsettings_client)
+    xsettings_client_destroy (screen_x11->xsettings_client);
   screen_x11->xsettings_client = NULL;
 }
 
Index: gdk/x11/gdkscreen-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkscreen-x11.c,v
retrieving revision 1.33
diff -u -p -u -r1.33 gdkscreen-x11.c
--- gdk/x11/gdkscreen-x11.c	21 Nov 2003 01:02:45 -0000	1.33
+++ gdk/x11/gdkscreen-x11.c	16 Dec 2003 16:12:52 -0000
@@ -284,7 +284,8 @@ gdk_screen_x11_dispose (GObject *object)
 
   _gdk_x11_events_uninit_screen (GDK_SCREEN (object));
 
-  g_object_unref (screen_x11->default_colormap);
+  if (screen_x11->default_colormap)
+    g_object_unref (screen_x11->default_colormap);
   screen_x11->default_colormap = NULL;
   
   screen_x11->root_window = NULL;
@@ -303,7 +304,7 @@ gdk_screen_x11_finalize (GObject *object
 {
   GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (object);
   /* int i; */
-  g_object_unref (screen_x11->root_window);
+  /*  g_object_unref (screen_x11->root_window); */
   
   /* Visual Part (Need to implement finalize for Visuals for a clean
    * finalize) */
