From: "Rodolfo García Peñas (kix)" <[email protected]>

The function get_rimage_icon_from_icon_win() now returns a image
instead set the icon image.
---
 src/icon.c |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/icon.c b/src/icon.c
index e979a6f..df2f96c 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -61,7 +61,7 @@ static void miniwindowDblClick(WObjDescriptor * desc, XEvent 
* event);
 static WIcon *icon_create_core(WScreen *scr, int coord_x, int coord_y);
 
 static void set_dockapp_in_icon(WIcon *icon);
-static void get_rimage_icon_from_icon_win(WIcon *icon);
+static RImage *get_rimage_icon_from_icon_win(WIcon *icon);
 static void get_rimage_icon_from_user_icon(WIcon *icon);
 static RImage *get_rimage_icon_from_default_icon(WIcon *icon);
 
@@ -608,8 +608,11 @@ void wIconUpdate(WIcon *icon, RImage *image)
                        /* Forced use user_icon */
                        get_rimage_icon_from_user_icon(icon);
                } else if (icon->icon_win != None) {
-                       /* Get the Pixmap from the WIcon */
-                       get_rimage_icon_from_icon_win(icon);
+                       /* Free the icon info */
+                       unset_icon_image(icon);
+
+                       /* Get the Pixmap from the WIcon's Window */
+                       icon->file_image = get_rimage_icon_from_icon_win(icon);
                } else if (wwin && wwin->net_icon_image) {
                        /* Remove the icon image */
                        unset_icon_image(icon);
@@ -683,7 +686,7 @@ static RImage *get_rimage_icon_from_default_icon(WIcon 
*icon)
 }
 
 /* Get the RImage from the WIcon of the WWindow */
-static void get_rimage_icon_from_icon_win(WIcon *icon)
+static RImage *get_rimage_icon_from_icon_win(WIcon *icon)
 {
        RImage *image;
 
@@ -693,11 +696,7 @@ static void get_rimage_icon_from_icon_win(WIcon *icon)
        if (!image)
                image = get_rimage_icon_from_default_icon(icon);
 
-       /* Free the icon info */
-       unset_icon_image(icon);
-
-       /* Set the new info */
-       icon->file_image = image;
+       return image;
 }
 
 /* Set the dockapp in the WIcon */
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to