From c24499f6add64a233e13288d43327833b38fd12e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Mon, 8 Apr 2013 19:40:45 +0200 Subject: [PATCH] wIconChangeImageFile use set_icon_image_from_image The function wIconChangeImageFile() now use set_icon_image_from_image() then: 1. Don't need call unset_icon_image() because the memory is free in the function set_icon_image_from_image(). 2. After update the icon info, it must set the file name. 3. The pixmap image could be updated. --- src/icon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/icon.c b/src/icon.c index eaca4663..a2cb8356 100644 --- a/src/icon.c +++ b/src/icon.c @@ -362,12 +362,10 @@ Bool wIconChangeImageFile(WIcon *icon, char *file) /* New image! */ if (!error && image) { - /* Remove the old one */ - unset_icon_image(icon); - /* Set the new image */ + set_icon_image_from_image(icon, image); icon->file = wstrdup(path); - wIconUpdate(icon, image); + update_icon_pixmap(icon); } else { error = 1; } -- 2.11.4.GIT