From: Rodolfo García Peñas (kix) Date: Sat, 3 Nov 2012 18:54:05 +0000 (+0100) Subject: New function update_icon_pixmap X-Git-Tag: wmaker-0.95.4~60 X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/c97bf1907963cf7b7094c42228d2c4fb008843f4 New function update_icon_pixmap The new function update_icon_pixmap() updates the pixmap for a icon task. Now, wIconCreate() creates the image and sets the icon->file and icon->file_image variables and update_icon_pixmap() updates the icon->pixmap. This is interesting because we can update the pixmaps without creating the image again. --- diff --git a/src/icon.c b/src/icon.c index 38814bff..9aa18c7f 100644 --- a/src/icon.c +++ b/src/icon.c @@ -614,6 +614,11 @@ void wIconUpdate(WIcon *icon) get_rimage_icon_from_user_icon(icon); } + update_icon_pixmap(icon); +} + +void update_icon_pixmap(WIcon *icon) +{ if (icon->pixmap != None) XFreePixmap(dpy, icon->pixmap); diff --git a/src/icon.h b/src/icon.h index f0786cbf..48cf58b7 100644 --- a/src/icon.h +++ b/src/icon.h @@ -62,6 +62,7 @@ void wIconPaint(WIcon *icon); void wIconUpdate(WIcon *icon); void wIconSelect(WIcon *icon); void wIconChangeTitle(WIcon *icon, char *new_title); +void update_icon_pixmap(WIcon *icon); Bool wIconChangeImageFile(WIcon *icon, char *file);