From b3d3c45768ac46c42e4424d4831bf82138e82c51 Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Mon, 15 Apr 2002 01:35:33 +0000 Subject: [PATCH] Sun Apr 14 22:34:41 2002 Michael Jennings (mej) Fixed a bug spotted by Charles Clancy that caused color modifiers to mistakenly be applied to the icon pixmap. SVN revision: 6132 --- ChangeLog | 5 +++++ src/pixmap.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index d4d3bea..b91b99a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4552,3 +4552,8 @@ Changed occurances of "noenc" to the correct keyword, "none." Thanks to Laurence J. Lane for pointing this one out also. ---------------------------------------------------------------------- +Sun Apr 14 22:34:41 2002 Michael Jennings (mej) + +Fixed a bug spotted by Charles Clancy that caused +color modifiers to mistakenly be applied to the icon pixmap. +---------------------------------------------------------------------- diff --git a/src/pixmap.c b/src/pixmap.c index 3546034..c77c412 100644 --- a/src/pixmap.c +++ b/src/pixmap.c @@ -2053,6 +2053,7 @@ set_icon_pixmap(char *filename, XWMHints * pwm_hints) const char *icon_path; Imlib_Image temp_im = (Imlib_Image) NULL; Imlib_Load_Error im_err; + Imlib_Color_Modifier tmp_cmod; XWMHints *wm_hints; int w = 8, h = 8; @@ -2062,6 +2063,11 @@ set_icon_pixmap(char *filename, XWMHints * pwm_hints) wm_hints = XGetWMHints(Xdisplay, TermWin.parent); } + /* Make sure no shading/tinting is applied to the icon. */ + tmp_cmod = imlib_create_color_modifier(); + imlib_context_set_color_modifier(tmp_cmod); + imlib_reset_color_modifier(); + if (filename && *filename) { if ((icon_path = search_path(rs_path, filename)) == NULL) icon_path = search_path(getenv(PATH_ENV), filename); @@ -2108,6 +2114,7 @@ set_icon_pixmap(char *filename, XWMHints * pwm_hints) imlib_context_set_anti_alias(1); imlib_context_set_dither(1); imlib_context_set_blend(0); + imlib_render_pixmaps_for_whole_image_at_size(&wm_hints->icon_pixmap, &wm_hints->icon_mask, w, h); if (check_for_enlightenment()) { wm_hints->flags |= IconPixmapHint | IconMaskHint;