aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Terry <michael.terry@canonical.com>2011-05-18 14:19:49 -0400
committerMichael Terry <michael.terry@canonical.com>2011-05-18 14:19:49 -0400
commitd75107a47c7fbf87f370cca0134a848d35c60eae (patch)
treeb2dc7d0220c1ff776af9ef69833753982fb45cd7
parent7ac87e8939eabab399c33bada6ab29c48ad9b986 (diff)
downloadlibdbusmenu-d75107a47c7fbf87f370cca0134a848d35c60eae.tar.gz
libdbusmenu-d75107a47c7fbf87f370cca0134a848d35c60eae.tar.bz2
libdbusmenu-d75107a47c7fbf87f370cca0134a848d35c60eae.zip
ref menu until we're done toggling its visibility
-rw-r--r--libdbusmenu-gtk/parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c
index b6423ca..7b27f4f 100644
--- a/libdbusmenu-gtk/parser.c
+++ b/libdbusmenu-gtk/parser.c
@@ -276,6 +276,7 @@ toggle_widget_visibility (GtkWidget * widget)
gboolean vis = gtk_widget_get_visible (widget);
gtk_widget_set_visible (widget, !vis);
gtk_widget_set_visible (widget, vis);
+ g_object_unref (G_OBJECT (widget));
return FALSE;
}
@@ -300,7 +301,8 @@ watch_submenu(DbusmenuMenuitem * mi, GtkWidget * menu)
any submenus we come across. Further, these apps need it done with a
delay while they finish initializing, so we put the call in the idle
queue. */
- g_idle_add((GSourceFunc)toggle_widget_visibility, menu);
+ g_idle_add((GSourceFunc)toggle_widget_visibility,
+ g_object_ref (G_OBJECT (menu)));
}
static void