diff --git a/src/modules/wlr/taskbar.cpp b/src/modules/wlr/taskbar.cpp index c2acbd9a..ef46f36a 100644 --- a/src/modules/wlr/taskbar.cpp +++ b/src/modules/wlr/taskbar.cpp @@ -135,10 +135,17 @@ static std::string get_from_desktop_app_info_search(const std::string &app_id) gchar*** desktop_list = g_desktop_app_info_search(app_id.c_str()); if (desktop_list != nullptr && desktop_list[0] != nullptr) { for (size_t i=0; desktop_list[0][i]; i++) { - if(desktop_file == "") { + if (desktop_file == "") { desktop_file = desktop_list[0][i]; + } else { + auto tmp_info = Gio::DesktopAppInfo::create(desktop_list[0][i]); + auto startup_class = tmp_info->get_startup_wm_class(); + + if (startup_class == app_id) { + desktop_file = desktop_list[0][i]; + break; + } } - break; } g_strfreev(desktop_list[0]); }