Skip to content

Commit f2a1c5f

Browse files
dkondorammen99
authored andcommitted
dock: handle icons for snap apps
1 parent e6f281e commit f2a1c5f

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/dock/toplevel-icon.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,22 @@ Icon get_from_desktop_app_info(std::string app_id)
308308
}
309309
}
310310

311+
if (!app_info)
312+
{
313+
// special treatment for snap apps
314+
std::string prefix = "/var/lib/snapd/desktop/applications/";
315+
auto& id = app_id_variations[1]; // seems to be lower case
316+
for (auto& suffix : suffixes)
317+
{
318+
app_info = Gio::DesktopAppInfo::create_from_filename(
319+
prefix + id + "_" + id + suffix);
320+
if (app_info)
321+
{
322+
break;
323+
}
324+
}
325+
}
326+
311327
if (app_info) // success
312328
{
313329
return app_info->get_icon();

0 commit comments

Comments
 (0)