Skip to content

Commit

Permalink
dock: handle icons for snap apps
Browse files Browse the repository at this point in the history
  • Loading branch information
dkondor committed Sep 21, 2024
1 parent d8ca94e commit 5bc0cbb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/dock/toplevel-icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,19 @@ Icon get_from_desktop_app_info(std::string app_id)
}
}

if (!app_info)
{
// special treatment for snap apps
std::string prefix = "/var/lib/snapd/desktop/applications/";
auto& id = app_id_variations[1]; // seems to be lower case
for (auto& suffix : suffixes)
{
app_info = Gio::DesktopAppInfo::create_from_filename(
prefix + id + "_" + id + suffix);
if (app_info) break;
}
}

if (app_info) // success
{
return app_info->get_icon();
Expand Down

0 comments on commit 5bc0cbb

Please sign in to comment.