Skip to content

Commit 5bc0cbb

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

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/dock/toplevel-icon.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,19 @@ 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) break;
286+
}
287+
}
288+
276289
if (app_info) // success
277290
{
278291
return app_info->get_icon();

0 commit comments

Comments
 (0)