aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbusmenu-gtk/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 830356a..4c3f1c2 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -741,8 +741,12 @@ process_a11y_desc (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant,
setname = g_variant_get_string(variant, NULL);
}
+ /* The atk docs advise to set the name of the atk object to an empty
+ * string, but GTK doesn't yet do the same, and setting the name to NULL
+ * causes tests to fail.
+ */
if (setname == NULL) {
- setname = "";
+ setname = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL);
}
atk_object_set_name(aobj, setname);