diff --git a/ChangeLog b/ChangeLog index bca63297d..5ce3fa86a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2004-07-09 Mike Kestner +2004-07-24 Mike Kestner + + * gdk/Gdk.metadata : hide Window.Destroy. + * gdk/Window.custom : manually impl Destroy since it releases our ref. + * glib/Object.cs : support unset of Raw values. + +2004-07-22 Mike Kestner * glib/Value.cs : allow null for ctor(GLib.Object). diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata index fac66d6dc..85fee2def 100644 --- a/gdk/Gdk.metadata +++ b/gdk/Gdk.metadata @@ -68,6 +68,7 @@ 1 1 1 + 1 1 GdkDrawable out diff --git a/gdk/Window.custom b/gdk/Window.custom index bdcd3bd90..135eef5a1 100644 --- a/gdk/Window.custom +++ b/gdk/Window.custom @@ -66,6 +66,14 @@ } } + [DllImport("libgdk-win32-2.0-0.dll")] + static extern void gdk_window_destroy(IntPtr raw); + + public void Destroy() { + gdk_window_destroy(Handle); + Raw = IntPtr.Zero; + } + public void MoveResize (Gdk.Rectangle rect) { gdk_window_move_resize (Handle, rect.X, rect.Y, rect.Width, rect.Height); } diff --git a/glib/Object.cs b/glib/Object.cs index 23a1415b2..35a368b92 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -197,6 +197,8 @@ namespace GLib { return _obj; } set { + if (_obj != IntPtr.Zero) + Objects.Remove (_obj); _obj = value; if (value == IntPtr.Zero) return;