Skip to content

Commit 7680279

Browse files
committed
dock: handle icons for snap apps
1 parent d8ca94e commit 7680279

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/dock/toplevel-icon.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,22 @@ Icon get_from_desktop_app_info(std::string app_id)
273273
}
274274
}
275275

276+
if (!app_info)
277+
{
278+
// special treatment for snap apps
279+
std::string prefix = "/var/lib/snapd/desktop/applications/";
280+
auto& id = app_id_variations[1]; // seems to be lower case
281+
for (auto& suffix : suffixes)
282+
{
283+
app_info = Gio::DesktopAppInfo::create_from_filename(
284+
prefix + id + "_" + id + suffix);
285+
if (app_info)
286+
{
287+
break;
288+
}
289+
}
290+
}
291+
276292
if (app_info) // success
277293
{
278294
return app_info->get_icon();

0 commit comments

Comments
 (0)