aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbusmenu-glib/server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 7d8e5c3..eb7c383 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -237,12 +237,14 @@ set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec)
case PROP_ROOT_NODE:
if (priv->root != NULL) {
dbusmenu_menuitem_foreach(priv->root, menuitem_signals_remove, obj);
+ dbusmenu_menuitem_set_root(priv->root, FALSE);
g_object_unref(G_OBJECT(priv->root));
priv->root = NULL;
}
priv->root = DBUSMENU_MENUITEM(g_value_get_object(value));
if (priv->root != NULL) {
g_object_ref(G_OBJECT(priv->root));
+ dbusmenu_menuitem_set_root(priv->root, TRUE);
dbusmenu_menuitem_foreach(priv->root, menuitem_signals_create, obj);
} else {
g_debug("Setting root node to NULL");