From 9554be0ce77bc19177897f2df4f7394ffda3e816 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Fri, 6 May 2022 21:52:46 +0100 Subject: [PATCH] menu: avoid logging on Labwc does not support menu icons, but we should not log errors if a menu file contains icons as in the example below: --- src/menu/menu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/menu/menu.c b/src/menu/menu.c index 8bfb29f2..fda73cee 100644 --- a/src/menu/menu.c +++ b/src/menu/menu.c @@ -167,6 +167,11 @@ fill_item(char *nodename, char *content) } else if (!current_item) { wlr_log(WLR_ERROR, "expect element first. " "nodename: '%s' content: '%s'", nodename, content); + } else if (!strcmp(nodename, "icon")) { + /* + * Do nothing as we don't support menu icons - just avoid + * logging errors if a menu.xml file contains icon="" entries. + */ } else if (!strcmp(nodename, "name.action")) { current_item_action = action_create(content); wl_list_insert(current_item->actions.prev, ¤t_item_action->link);