mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
icon-loader: fix a few more missing icons
By: - stripping extensions from relative icon filenames (for example, gdmap.desktop has "Icon=gdmap_icon.png") - using the WM_CLASS "instance" rather than "class" string, which is usually the same but lowercase
This commit is contained in:
parent
c2a3a354db
commit
977d561695
2 changed files with 35 additions and 3 deletions
|
|
@ -489,9 +489,17 @@ xwayland_view_get_string_prop(struct view *view, const char *prop)
|
|||
if (!strcmp(prop, "class")) {
|
||||
return xwayland_surface->class;
|
||||
}
|
||||
/* We give 'class' for wlr_foreign_toplevel_handle_v1_set_app_id() */
|
||||
/*
|
||||
* Use the WM_CLASS 'instance' (1st string) for the app_id. Per
|
||||
* ICCCM, this is usually "the trailing part of the name used to
|
||||
* invoke the program (argv[0] stripped of any directory names)".
|
||||
*
|
||||
* In most cases, the 'class' (2nd string) is the same as the
|
||||
* 'instance' except for being capitalized. We want lowercase
|
||||
* here since we use the app_id for icon lookups.
|
||||
*/
|
||||
if (!strcmp(prop, "app_id")) {
|
||||
return xwayland_surface->class;
|
||||
return xwayland_surface->instance;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue