]> git.mdlowis.com Git - proto/labwc.git/commitdiff
icon-loader: fall back to app-id if icon from .desktop failed
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 17 Nov 2024 20:25:34 +0000 (21:25 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 17 Nov 2024 21:41:29 +0000 (22:41 +0100)
Reported-By: LimeOn via IRC
src/icon-loader.c

index 43c5f48a9fd65130937ca6350fb5d3ea71563bd8..d31ae07eccd4e21e03399ca430ad9c1dc6dc7567 100644 (file)
@@ -290,6 +290,10 @@ icon_loader_lookup(struct server *server, const char *app_id, int size,
        } else {
                /* this should be the case for most icons */
                ret = process_rel_name(&ctx, icon_name, loader, lookup_size, lookup_scale);
+               /* Icon defined in .desktop file could not be loaded, retry with app_id */
+               if (ret < 0) {
+                       ret = process_rel_name(&ctx, app_id, loader, lookup_size, lookup_scale);
+               }
        }
        if (ret < 0) {
                return NULL;