mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 12:45:45 +00:00
* gtk/Object.custom (Raw): Always ref the object, even if it's not
floating when we get it, since GLib assumes we hold a ref on it. [Fixes #74468] * gtk/Window.custom: remove refcount special-handling here svn path=/trunk/gtk-sharp/; revision=42653
This commit is contained in:
parent
ec96098612
commit
7c80282cfd
|
@ -1,3 +1,11 @@
|
||||||
|
2005-04-07 Dan Winship <danw@novell.com>
|
||||||
|
|
||||||
|
* gtk/Object.custom (Raw): Always ref the object, even if it's not
|
||||||
|
floating when we get it, since GLib assumes we hold a ref on it.
|
||||||
|
[Fixes #74468]
|
||||||
|
|
||||||
|
* gtk/Window.custom: remove refcount special-handling here
|
||||||
|
|
||||||
2005-04-06 Mike Kestner <mkestner@novell.com>
|
2005-04-06 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* gtk/FileFilter.custom : AddCustom delegate is destroy notified.
|
* gtk/FileFilter.custom : AddCustom delegate is destroy notified.
|
||||||
|
|
|
@ -39,12 +39,9 @@
|
||||||
if (value == IntPtr.Zero)
|
if (value == IntPtr.Zero)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gtksharp_object_is_floating (value)) {
|
|
||||||
g_object_ref (value);
|
g_object_ref (value);
|
||||||
Sink ();
|
Sink ();
|
||||||
}
|
}
|
||||||
// System.Diagnostics.Debug.WriteLine ("Gtk.Object:set_Raw: object type is: " + (this as GLib.Object).GType.Name + " refcount now: " + RefCount + " needs_ref: " + needs_ref);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
|
|
@ -21,32 +21,6 @@
|
||||||
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
// Boston, MA 02111-1307, USA.
|
// Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[DllImport("libgobject-2.0-0.dll")]
|
|
||||||
private static extern void g_object_ref (IntPtr raw);
|
|
||||||
|
|
||||||
static Hashtable windows = new Hashtable ();
|
|
||||||
|
|
||||||
protected override IntPtr Raw {
|
|
||||||
get {
|
|
||||||
return base.Raw;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
base.Raw = value;
|
|
||||||
if (value == IntPtr.Zero)
|
|
||||||
return;
|
|
||||||
g_object_ref (value);
|
|
||||||
windows [value] = this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Destroy ()
|
|
||||||
{
|
|
||||||
base.Destroy ();
|
|
||||||
windows [Handle] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Window (String title) : this (WindowType.Toplevel)
|
public Window (String title) : this (WindowType.Toplevel)
|
||||||
{
|
{
|
||||||
this.Title = title;
|
this.Title = title;
|
||||||
|
|
Loading…
Reference in a new issue