[Xfce4-commits] [xfce/xfwm4] 02/02: icons: Fallback to resource class name for icons
noreply at xfce.org
noreply at xfce.org
Thu Jun 13 21:24:22 CEST 2019
This is an automated email from the git hooks/post-receive script.
o l i v i e r p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfwm4.
commit 84a3b1455a96f73da83c1c0a3184f5d896086a0b
Author: Iharob Al Asimi <iharob at gmail.com>
Date: Thu May 30 16:58:24 2019 -0400
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.
---
src/icons.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/icons.c b/src/icons.c
index f12feec..8318b89 100644
--- a/src/icons.c
+++ b/src/icons.c
@@ -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);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list