From: "Rodolfo García Peñas (kix)" <[email protected]>
The function wIconStore stores the image of net_icon_image, but
if the image doesn't exits, save the image provided by wm_hints.
if (wwin->net_icon_image)
image = RRetainImage(wwin->net_icon_image);
else
image = get_wwindow_image_from_wm_hints(wwin);
But now, the net_icon_image is created using:
wwin->net_icon_image = get_window_image(wwin);
And the function get_window_image() is:
static RImage *get_window_image(WWindow *wwin)
{
RImage *image = NULL;
/* First, get the image from the client (net_wm_icon) */
image = get_window_image_from_x11(wwin->client_win);
/* If no image, get the image from the window hints */
if (!image)
image = get_wwindow_image_from_wm_hints(wwin);
/* If no image, don't return the default image
* is better to control if we found the image and
* for example, don't save the default icon as cache */
return image;
}
Therefore, the image is included and the else block is not needed.
---
src/icon.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index 8ee69ca..abb2056 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -517,8 +517,6 @@ char *wIconStore(WIcon * icon)
if (wwin->net_icon_image)
image = RRetainImage(wwin->net_icon_image);
- else
- image = get_wwindow_image_from_wm_hints(wwin);
if (!image) {
wfree(path);
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].