[Xfce4-commits] [xfce/xfdesktop] 01/03: Use mini icon and allow dimming of non-scaled icons
noreply at xfce.org
noreply at xfce.org
Mon Mar 2 14:25:04 CET 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository xfce/xfdesktop.
commit 9e2689ae31aa999b5acaa5b627e3165dc59f230f
Author: Thaddaeus Tintenfisch <thad.fisch at gmail.com>
Date: Fri Feb 20 01:02:01 2015 +0100
Use mini icon and allow dimming of non-scaled icons
Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
src/windowlist.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/windowlist.c b/src/windowlist.c
index e915718..11ae7c1 100644
--- a/src/windowlist.c
+++ b/src/windowlist.c
@@ -171,18 +171,22 @@ menu_item_from_wnck_window(WnckWindow *wnck_window, gint icon_width,
}
if(wl_show_icons) {
- icon = wnck_window_get_icon(wnck_window);
+ icon = wnck_window_get_mini_icon(wnck_window);
w = gdk_pixbuf_get_width(icon);
h = gdk_pixbuf_get_height(icon);
if(w != icon_width || h != icon_height) {
tmp = gdk_pixbuf_scale_simple(icon, icon_width, icon_height,
- GDK_INTERP_BILINEAR);
+ GDK_INTERP_BILINEAR);
+ }
- if(wnck_window_is_minimized(wnck_window)) {
- /* minimized window, fade out app icon */
- gdk_pixbuf_saturate_and_pixelate(tmp, tmp, 0.55, TRUE);
- }
+ if(wnck_window_is_minimized(wnck_window)) {
+ if(!tmp)
+ tmp = gdk_pixbuf_copy(icon);
+ /* minimized window, fade out app icon */
+ gdk_pixbuf_saturate_and_pixelate(tmp, tmp, 0.55, TRUE);
+ }
+ if(tmp) {
img = gtk_image_new_from_pixbuf(tmp);
g_object_unref(G_OBJECT(tmp));
} else
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list