mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
desktop-entry.c: on detecting a broken icon theme, fall back to hicolor
Fixes: #3126 Reported-By: Kreevoz
This commit is contained in:
parent
998ff9e7b5
commit
cb0a4b875e
1 changed files with 12 additions and 0 deletions
|
|
@ -108,6 +108,18 @@ desktop_entry_init(struct server *server)
|
|||
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);
|
||||
sfdo->icon_theme = sfdo_icon_theme_load(
|
||||
sfdo->icon_ctx, "hicolor", load_options);
|
||||
}
|
||||
if (!sfdo->icon_theme) {
|
||||
goto err_icon_theme;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue