1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-25 16:02:33 +01:00

get_wwindow_image_from_wmhints scale image

The function get_wwindow_image_from_wmhints returns a image from WM Hints,
but the image could be larger than the desired.

Then, the image can be resized using wIconValidateIconSize(). The resize
should be done in get_rimage_icon_from_wm_hints(), not in the function
get_wwindow_image_from_wmhints(). This is because the function
get_wwindow_image_from_wmhints() is used in wIconStore() too. If we resize
the image before save it to disk, then if we change the icon/dock size, then
the image saved will have a different size than the curren icon size. Is
better resize the image when is painted in the screen, not the image saved.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-11-14 18:36:25 +01:00
committed by Carlos R. Mafra
parent ead0fb2e4b
commit 5956d71d77

View File

@@ -756,6 +756,9 @@ static int get_rimage_icon_from_wm_hints(WIcon *icon)
if (!image)
return 1;
/* Resize the icon to the wPreferences.icon_size size */
image = wIconValidateIconSize(image, wPreferences.icon_size);
unset_icon_image(icon);
icon->file_image = image;