From 8e6cbc10219f5f73d7d7162d3f7f033ee307d658 Mon Sep 17 00:00:00 2001 From: dmitry Date: Wed, 1 Jul 2020 02:10:22 +0300 Subject: [PATCH] Change find icon priority and to_lower app_id --- src/modules/wlr/taskbar.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/wlr/taskbar.cpp b/src/modules/wlr/taskbar.cpp index f5889702..16762357 100644 --- a/src/modules/wlr/taskbar.cpp +++ b/src/modules/wlr/taskbar.cpp @@ -85,9 +85,9 @@ 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::string icon_name = get_from_desktop_app_info(app_id); + std::string icon_name = get_from_icon_theme(icon_theme, app_id); if (icon_name.empty()) - icon_name = get_from_icon_theme(icon_theme, app_id); + icon_name = get_from_desktop_app_info(app_id); if (icon_name.empty()) continue; @@ -271,7 +271,9 @@ void Task::handle_title(const char *title) void Task::handle_app_id(const char *app_id) { app_id_ = app_id; - if (!image_load_icon(icon_, tbar_->icon_theme(), app_id_, + std::transform(app_id_.begin(), app_id_.end(), app_id_.begin(), + [](char c){ return std::tolower(c); }); + if (!image_load_icon(icon_, tbar_->icon_theme(), app_id_, config_["icon-size"].isInt() ? config_["icon-size"].asInt() : 16)) spdlog::warn("Failed to load icon for {}", app_id);