Skip to content
Snippets Groups Projects
Commit 84a3b145 authored by Iharob Al Asimi's avatar Iharob Al Asimi Committed by Olivier Fourdan
Browse files

icons: Fallback to resource class name for icons

Bug: 15510

Use the WM_CLASS property and extract the instance name from it, then
use GtkIconTheme to determine the icon that should be used in place of
the missing icon.
parent 7218546b
No related branches found
No related tags found
No related merge requests found
......@@ -540,6 +540,18 @@ getAppIcon (Client *c, guint width, guint height)
}
}
if (c->class.res_name != NULL)
{
GdkPixbuf *icon = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
c->class.res_name,
MIN (width, height),
0, NULL);
if (icon)
{
return icon;
}
}
return default_icon_at_size (screen_info->gscr, width, height);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment