mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
icon-loader: also match desktop entries StartupWMClass
GIMP for example sets its WM_CLASS to "gimp-2.10", which does not match the "gimp.desktop" filename, but matches the StartupWMClass key listed in it. Thanks to @vyivel for the suggestion.
This commit is contained in:
parent
eb8db30a86
commit
b4bc6ffceb
1 changed files with 7 additions and 0 deletions
|
|
@ -182,6 +182,13 @@ get_db_entry_by_id_fuzzy(struct sfdo_desktop_db *db, const char *app_id)
|
|||
if (!strcasecmp(app_id, desktop_id_base)) {
|
||||
return entry;
|
||||
}
|
||||
|
||||
/* Try desktop entry's StartupWMClass also */
|
||||
const char *wm_class =
|
||||
sfdo_desktop_entry_get_startup_wm_class(entry, NULL);
|
||||
if (wm_class && !strcasecmp(app_id, wm_class)) {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue