[gtk+] gtk_window_set_attached_to: ref(), not ref_sink() the attach_widget
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk_window_set_attached_to: ref(), not ref_sink() the attach_widget
- Date: Tue, 21 Feb 2012 00:11:07 +0000 (UTC)
commit 914053a2a3d21b87c81527ed25fc36776d976488
Author: Michael Natterer <mitch gimp org>
Date: Tue Feb 21 01:04:53 2012 +0100
gtk_window_set_attached_to: ref(), not ref_sink() the attach_widget
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 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 32e736f..c73c0e3 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]