diff --git a/gobject/pygobject.c b/gobject/pygobject.c
index b4274e1..161ad80 100644
--- a/gobject/pygobject.c
+++ b/gobject/pygobject.c
@@ -133,16 +133,13 @@ PyTypeObject *PyGObject_MetaType = NULL;
 void
 pygobject_sink(GObject *obj)
 {
-    if (sink_funcs) {
-	gint i;
-
-	for (i = 0; i < sink_funcs->len; i++) {
-	    if (g_type_is_a(G_OBJECT_TYPE(obj),
-			    g_array_index(sink_funcs, SinkFunc, i).type)) {
-		g_array_index(sink_funcs, SinkFunc, i).sinkfunc(obj);
-		break;
-	    }
-	}
+    if (G_IS_INITIALLY_UNOWNED(obj) && !g_object_is_floating(obj)) {
+        /* GtkWindow does not return a ref to caller of g_object_new.
+            * Need a flag in gobject-introspection to tell us this.
+            */
+        g_object_ref(obj);
+    } else if (g_object_is_floating(obj)) {
+        g_object_ref_sink(obj);
     }
 }
 
@@ -158,23 +155,13 @@ pygobject_sink(GObject *obj)
  *
  * The sinkfunc should be able to remove the floating reference on
  * instances of the given type, or any subclasses.
+ *
+ * Deprecated: Since 2.20, sinkfuncs are not needed.
  */
 void
 pygobject_register_sinkfunc(GType type, void (* sinkfunc)(GObject *object))
 {
-    SinkFunc sf;
-
-#if 0
-    g_return_if_fail(G_TYPE_IS_OBJECT(type));
-#endif
-    g_return_if_fail(sinkfunc != NULL);
-    
-    if (!sink_funcs)
-	sink_funcs = g_array_new(FALSE, FALSE, sizeof(SinkFunc));
 
-    sf.type = type;
-    sf.sinkfunc = sinkfunc;
-    g_array_append_val(sink_funcs, sf);
 }
 
 typedef struct {
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
index 47beb7d..aab6870 100644
--- a/gobject/pygobject.h
+++ b/gobject/pygobject.h
@@ -211,6 +211,7 @@ struct _PyGObject_Functions *_PyGObject_API;
 
 #define pygobject_register_class    (_PyGObject_API->register_class)
 #define pygobject_register_wrapper  (_PyGObject_API->register_wrapper)
+/* This is deprecated, sinkfuncs are not needed anymore */
 #define pygobject_register_sinkfunc (_PyGObject_API->register_sinkfunc)
 #define pygobject_lookup_class      (_PyGObject_API->lookup_class)
 #define pygobject_new               (_PyGObject_API->newgobj)
