From: "Rodolfo García Peñas (kix)" <[email protected]>
The new function update_icon_pixmap do the update pixmap for a icon task.
Now, wIconCreate creates the image and set the icon->file and icon->file_image
variables, but update_icon_pixmap updates the icon->pixmap.
This is so interesting because we can update the pixmaps without create the
image again.
---
src/icon.c | 5 +++++
src/icon.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/src/icon.c b/src/icon.c
index 7548699..fe52a09 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 f0786cb..48cf58b 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);
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].