diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2876ac9..a9ccbb06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,7 @@ on: - 'src/**' - 'include/**' - 'protocols/**' + - 'clients/**' - 'scripts/**' - '.github/workflows/**' diff --git a/clients/meson.build b/clients/meson.build index c131915d..54b92db8 100644 --- a/clients/meson.build +++ b/clients/meson.build @@ -51,7 +51,7 @@ executable( epoll_dep, ], include_directories: [labwc_inc], - install: true + install: true, ) clients = files('lab-sensible-terminal') diff --git a/src/common/xml.c b/src/common/xml.c index 7e089267..0185d9a3 100644 --- a/src/common/xml.c +++ b/src/common/xml.c @@ -48,7 +48,7 @@ create_attribute_tree(const xmlAttr *attr) } /* - * Consider . + * Consider . * These three attributes are represented by following trees. * action(dst)---name * action(src)---position---x @@ -79,7 +79,8 @@ merge_two_trees(xmlNode *dst, xmlNode *src) && !strcasecmp((char *)dst->name, (char *)src->name)) { xmlNode *next_dst = dst->last; xmlNode *next_src = src->children; - xmlAddChild(dst, src->children); + xmlUnlinkNode(next_src); + xmlAddChild(dst, next_src); xmlUnlinkNode(src); xmlFreeNode(src); src = next_src; diff --git a/src/desktop-entry.c b/src/desktop-entry.c index 7aefa77e..7617fa26 100644 --- a/src/desktop-entry.c +++ b/src/desktop-entry.c @@ -37,9 +37,10 @@ log_handler(enum sfdo_log_level level, const char *fmt, va_list args, void *tag) /* * To avoid logging issues with .desktop files as errors, all libsfdo - * error-logging is demoted to info level. + * error-logging is demoted to info level unless running with + * LABWC_DEBUG_LIBSFDO. */ - if (level == SFDO_LOG_LEVEL_ERROR) { + if (!debug_libsfdo && level == SFDO_LOG_LEVEL_ERROR) { level = SFDO_LOG_LEVEL_INFO; } @@ -95,19 +96,37 @@ desktop_entry_init(struct server *server) * We set some relaxed load options to accommodate delinquent themes in * the wild, namely: * - * - SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING to "impose less - * restrictions on the format of icon theme files" + * - SFDO_ICON_THEME_LOAD_OPTION_RELAXED to "impose less restrictions + * on the format of icon theme files" * - * - SFDO_ICON_THEME_LOAD_OPTION_RELAXED to "continue loading even if it - * fails to find a theme or one of its dependencies." + * - SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING to "continue loading + * even if it fails to find a theme or one of its dependencies." */ int load_options = SFDO_ICON_THEME_LOAD_OPTIONS_DEFAULT - | SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING - | SFDO_ICON_THEME_LOAD_OPTION_RELAXED; + | SFDO_ICON_THEME_LOAD_OPTION_RELAXED + | SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING; sfdo->icon_theme = sfdo_icon_theme_load( sfdo->icon_ctx, rc.icon_theme_name, load_options); + if (!sfdo->icon_theme) { + /* + * sfdo_icon_theme_load() falls back to hicolor theme with + * _ALLOW_MISSING flag when the theme is missing, but just + * fails when the theme is invalid. + * So manually call sfdo_icon_theme_load() again here. + */ + wlr_log(WLR_ERROR, "Failed to load icon theme %s, falling back to 'hicolor'", + rc.icon_theme_name); + + if (!debug_libsfdo) { + wlr_log(WLR_ERROR, "Further information is available by setting " + "the LABWC_DEBUG_LIBSFDO=1 env var before starting labwc"); + } + + sfdo->icon_theme = sfdo_icon_theme_load( + sfdo->icon_ctx, "hicolor", load_options); + } if (!sfdo->icon_theme) { goto err_icon_theme; } @@ -129,6 +148,10 @@ err_desktop_ctx: err_basedir_ctx: free(sfdo); wlr_log(WLR_ERROR, "Failed to initialize icon loader"); + if (!debug_libsfdo) { + wlr_log(WLR_ERROR, "Further information is available by setting " + "the LABWC_DEBUG_LIBSFDO=1 env var before starting labwc"); + } } void