]> Pileus Git - ~andy/gtk/commitdiff
gtk_window_set_attached_to: ref(), not ref_sink() the attach_widget
authorMichael Natterer <mitch@gimp.org>
Tue, 21 Feb 2012 00:04:53 +0000 (01:04 +0100)
committerMichael Natterer <mitch@gimp.org>
Tue, 21 Feb 2012 00:06:43 +0000 (01:06 +0100)
The attached popup doesn't take ownership of its "parent" widget, so
ref_sink() was wrong, and caused widgets to be leaked.

gtk/gtkwindow.c

index 32e736f3cd12694b5cf303c74a459757f188344f..c73c0e3d5bd754dea4157ac1f1f39ff30b3322c3 100644 (file)
@@ -2662,7 +2662,7 @@ gtk_window_set_attached_to (GtkWindow *window,
     {
       _gtk_widget_add_attached_window (priv->attach_widget, window);
 
-      g_object_ref_sink (priv->attach_widget);
+      g_object_ref (priv->attach_widget);
     }
 
   /* Update the style, as the widget path might change. */