1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

Better default icon management

This patch replaces the Pixmap icons from screen.h with only one
RImage. This image is not processed yet, therefore could be used
for icons with title or without it (replacing def_ticon_pixmap and
def_icon_pixmap variables).

Now the code is better because the Pixmap is generated and saved in
the icon structure.

See that before this patch, the icon->pixmap was set to None!!
With this patch, the icon->pixmap is saved, using the common
method used in the other functions to create Pixmaps, the function
icon_update_pixmap().
This commit is contained in:
Rodolfo García Peñas (kix)
2012-10-23 23:59:57 +02:00
committed by Carlos R. Mafra
parent 4f4b7655de
commit ff9f942c47
3 changed files with 17 additions and 30 deletions

View File

@@ -2381,18 +2381,14 @@ static int setIconTile(WScreen * scr, WDefaultEntry * entry, WTexture ** texture
scr->icon_tile_pixmap = pixmap;
if (scr->def_icon_pixmap) {
XFreePixmap(dpy, scr->def_icon_pixmap);
scr->def_icon_pixmap = None;
}
if (scr->def_ticon_pixmap) {
XFreePixmap(dpy, scr->def_ticon_pixmap);
scr->def_ticon_pixmap = None;
if (scr->def_icon_rimage) {
RReleaseImage(scr->def_icon_rimage);
scr->def_icon_rimage = NULL;
}
if (scr->icon_back_texture) {
if (scr->icon_back_texture)
wTextureDestroy(scr, (WTexture *) scr->icon_back_texture);
}
scr->icon_back_texture = wTextureMakeSolid(scr, &((*texture)->any.color));
if (scr->clip_balloon)