From 1a0e665e58905c2164091012d6ffe867feac54a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sun, 4 Mar 2012 17:14:28 +0100 Subject: [PATCH] WindowMaker: icon.c comments added Some comments added to icon.c file. --- src/icon.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/icon.c b/src/icon.c index 40abbfb3..f64a7559 100644 --- a/src/icon.c +++ b/src/icon.c @@ -574,15 +574,19 @@ void wIconUpdate(WIcon * icon) icon->pixmap = makeIcon(scr, wwin->net_icon_image, icon->show_title, icon->shadowed, icon->tile_type, icon->highlighted); } else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) { + /* Get the Pixmap from the wm_hints, else, from the user */ if (get_pixmap_icon_from_wm_hints(scr, wwin, icon)) get_pixmap_icon_from_user_icon(scr, icon); } else { + /* Get the Pixmap from the user */ get_pixmap_icon_from_user_icon(scr, icon); } + /* No pixmap, set default background */ if (icon->pixmap != None) XSetWindowBackgroundPixmap(dpy, icon->core->window, icon->pixmap); + /* Paint it */ XClearWindow(dpy, icon->core->window); wIconPaint(icon); } @@ -611,6 +615,7 @@ void get_pixmap_icon_from_user_icon(WScreen *scr, WIcon * icon) } else { wwarning(_("could not find default icon \"%s\""), file); } + /* FIXME: Probably wfree(file) here! */ } image = wIconValidateIconSize(scr, image, wPreferences.icon_size);