mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-05 13:24:14 +01:00
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
6bfb175b19
commit
c97bf19079
@@ -614,6 +614,11 @@ void wIconUpdate(WIcon *icon)
|
|||||||
get_rimage_icon_from_user_icon(icon);
|
get_rimage_icon_from_user_icon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_icon_pixmap(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
void update_icon_pixmap(WIcon *icon)
|
||||||
|
{
|
||||||
if (icon->pixmap != None)
|
if (icon->pixmap != None)
|
||||||
XFreePixmap(dpy, icon->pixmap);
|
XFreePixmap(dpy, icon->pixmap);
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ void wIconPaint(WIcon *icon);
|
|||||||
void wIconUpdate(WIcon *icon);
|
void wIconUpdate(WIcon *icon);
|
||||||
void wIconSelect(WIcon *icon);
|
void wIconSelect(WIcon *icon);
|
||||||
void wIconChangeTitle(WIcon *icon, char *new_title);
|
void wIconChangeTitle(WIcon *icon, char *new_title);
|
||||||
|
void update_icon_pixmap(WIcon *icon);
|
||||||
|
|
||||||
Bool wIconChangeImageFile(WIcon *icon, char *file);
|
Bool wIconChangeImageFile(WIcon *icon, char *file);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user