diff --git a/src/modules/wlr/taskbar.cpp b/src/modules/wlr/taskbar.cpp index 6dd24a73..95a7a512 100644 --- a/src/modules/wlr/taskbar.cpp +++ b/src/modules/wlr/taskbar.cpp @@ -86,11 +86,13 @@ static bool image_load_icon(Gtk::Image& image, Glib::RefPtr icon * send a single app-id, but in any case this works fine */ while (stream >> app_id) { - std::transform(app_id.begin(), app_id.end(), lower_app_id.begin(), - [](char c){ return std::tolower(c); }); std::string icon_name = get_from_icon_theme(icon_theme, app_id); - if (icon_name.empty()) + if (icon_name.empty()) { + lower_app_id = app_id; + std::transform(lower_app_id.begin(), lower_app_id.end(), lower_app_id.begin(), + [](char c){ return std::tolower(c); }); icon_name = get_from_icon_theme(icon_theme, lower_app_id); + } if (icon_name.empty()) icon_name = get_from_desktop_app_info(app_id);