Merge pull request #1021 from jgmdev/taskbar-icons

[wlr/taskbar] Check StartupWMClass
This commit is contained in:
Alex 2021-02-07 16:52:34 +01:00 committed by GitHub
commit f3ce7ff86c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -137,9 +137,16 @@ static std::string get_from_desktop_app_info_search(const std::string &app_id)
for (size_t i=0; desktop_list[0][i]; i++) {
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;
}
}
}
g_strfreev(desktop_list[0]);
}
g_free(desktop_list);