Sun Apr 14 22:34:41 2002 Michael Jennings (mej)
Fixed a bug spotted by Charles Clancy <tclancy@uiuc.edu> that caused color modifiers to mistakenly be applied to the icon pixmap. SVN revision: 6132
This commit is contained in:
parent
a42eb977bf
commit
b3d3c45768
|
@ -4552,3 +4552,8 @@ Changed occurances of "noenc" to the correct keyword, "none." Thanks
|
||||||
to Laurence J. Lane <ljlane@debian.org> for pointing this one out
|
to Laurence J. Lane <ljlane@debian.org> for pointing this one out
|
||||||
also.
|
also.
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
Sun Apr 14 22:34:41 2002 Michael Jennings (mej)
|
||||||
|
|
||||||
|
Fixed a bug spotted by Charles Clancy <tclancy@uiuc.edu> that caused
|
||||||
|
color modifiers to mistakenly be applied to the icon pixmap.
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
|
@ -2053,6 +2053,7 @@ set_icon_pixmap(char *filename, XWMHints * pwm_hints)
|
||||||
const char *icon_path;
|
const char *icon_path;
|
||||||
Imlib_Image temp_im = (Imlib_Image) NULL;
|
Imlib_Image temp_im = (Imlib_Image) NULL;
|
||||||
Imlib_Load_Error im_err;
|
Imlib_Load_Error im_err;
|
||||||
|
Imlib_Color_Modifier tmp_cmod;
|
||||||
XWMHints *wm_hints;
|
XWMHints *wm_hints;
|
||||||
int w = 8, h = 8;
|
int w = 8, h = 8;
|
||||||
|
|
||||||
|
@ -2062,6 +2063,11 @@ set_icon_pixmap(char *filename, XWMHints * pwm_hints)
|
||||||
wm_hints = XGetWMHints(Xdisplay, TermWin.parent);
|
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 (filename && *filename) {
|
||||||
if ((icon_path = search_path(rs_path, filename)) == NULL)
|
if ((icon_path = search_path(rs_path, filename)) == NULL)
|
||||||
icon_path = search_path(getenv(PATH_ENV), filename);
|
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_anti_alias(1);
|
||||||
imlib_context_set_dither(1);
|
imlib_context_set_dither(1);
|
||||||
imlib_context_set_blend(0);
|
imlib_context_set_blend(0);
|
||||||
|
|
||||||
imlib_render_pixmaps_for_whole_image_at_size(&wm_hints->icon_pixmap, &wm_hints->icon_mask, w, h);
|
imlib_render_pixmaps_for_whole_image_at_size(&wm_hints->icon_pixmap, &wm_hints->icon_mask, w, h);
|
||||||
if (check_for_enlightenment()) {
|
if (check_for_enlightenment()) {
|
||||||
wm_hints->flags |= IconPixmapHint | IconMaskHint;
|
wm_hints->flags |= IconPixmapHint | IconMaskHint;
|
||||||
|
|
Loading…
Reference in New Issue