mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-05-24 13:12:09 +00:00
2008-04-24 Mike Kestner <mkestner@novell.com>
* gdk/Window.custom (Destroy): take a normal ref for the native method to release, and Dispose our toggle ref. Fixes #382186. svn path=/trunk/gtk-sharp/; revision=101734
This commit is contained in:
parent
a0d608fcd2
commit
e7489cc003
|
@ -1,3 +1,8 @@
|
||||||
|
2008-04-24 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* gdk/Window.custom (Destroy): take a normal ref for the native
|
||||||
|
method to release, and Dispose our toggle ref. Fixes #382186.
|
||||||
|
|
||||||
2008-04-24 Andres G. Aragoneses <aaragoneses@novell.com>
|
2008-04-24 Andres G. Aragoneses <aaragoneses@novell.com>
|
||||||
|
|
||||||
* glib/Signal.cs: Remove unneeded cast.
|
* glib/Signal.cs: Remove unneeded cast.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// Mike Kestner <mkestner@ximian.com>
|
// Mike Kestner <mkestner@ximian.com>
|
||||||
//
|
//
|
||||||
// Copyright (c) 2003 Moritz Balz
|
// Copyright (c) 2003 Moritz Balz
|
||||||
// Copyright (c) 2004 Novell, Inc.
|
// Copyright (c) 2004 - 2008 Novell, Inc.
|
||||||
//
|
//
|
||||||
// This code is inserted after the automatically generated code.
|
// This code is inserted after the automatically generated code.
|
||||||
//
|
//
|
||||||
|
@ -68,12 +68,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
|
static extern IntPtr g_object_ref (IntPtr raw);
|
||||||
|
|
||||||
[DllImport("libgdk-win32-2.0-0.dll")]
|
[DllImport("libgdk-win32-2.0-0.dll")]
|
||||||
static extern void gdk_window_destroy(IntPtr raw);
|
static extern void gdk_window_destroy(IntPtr raw);
|
||||||
|
|
||||||
public void Destroy() {
|
public void Destroy ()
|
||||||
|
{
|
||||||
|
// native method assumes an outstanding normal ref, but we hold a
|
||||||
|
// toggle ref. take out a normal ref for it to release, and let
|
||||||
|
// Dispose release our toggle ref.
|
||||||
|
g_object_ref (Handle);
|
||||||
gdk_window_destroy(Handle);
|
gdk_window_destroy(Handle);
|
||||||
Raw = IntPtr.Zero;
|
Dispose ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveResize (Gdk.Rectangle rect) {
|
public void MoveResize (Gdk.Rectangle rect) {
|
||||||
|
|
Loading…
Reference in a new issue