Skip to content

Commit f3ce7ff

Browse files
authored
Merge pull request Alexays#1021 from jgmdev/taskbar-icons
[wlr/taskbar] Check StartupWMClass
2 parents 71f9ed3 + e4a65c7 commit f3ce7ff

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/modules/wlr/taskbar.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,17 @@ static std::string get_from_desktop_app_info_search(const std::string &app_id)
135135
gchar*** desktop_list = g_desktop_app_info_search(app_id.c_str());
136136
if (desktop_list != nullptr && desktop_list[0] != nullptr) {
137137
for (size_t i=0; desktop_list[0][i]; i++) {
138-
if(desktop_file == "") {
138+
if (desktop_file == "") {
139139
desktop_file = desktop_list[0][i];
140+
} else {
141+
auto tmp_info = Gio::DesktopAppInfo::create(desktop_list[0][i]);
142+
auto startup_class = tmp_info->get_startup_wm_class();
143+
144+
if (startup_class == app_id) {
145+
desktop_file = desktop_list[0][i];
146+
break;
147+
}
140148
}
141-
break;
142149
}
143150
g_strfreev(desktop_list[0]);
144151
}

0 commit comments

Comments
 (0)