From: "Rodolfo García Peñas (kix)" <[email protected]>
The function get_rimage_icon_from_x11() set the window icon image
in the icon. This function is used only once and their code is so
small (only two code lines).
This patch removes the function and moves the code to wIconUpdate.
---
src/icon.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/icon.c b/src/icon.c
index 13a0c94..d2c8d10 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -64,7 +64,6 @@ static void set_dockapp_in_icon(WIcon *icon);
static void get_rimage_icon_from_icon_win(WIcon *icon);
static void get_rimage_icon_from_user_icon(WIcon *icon);
static void get_rimage_icon_from_default_icon(WIcon *icon);
-static void get_rimage_icon_from_x11(WIcon *icon);
static void icon_update_pixmap(WIcon *icon, RImage *image);
static void unset_icon_image(WIcon *icon);
@@ -612,8 +611,12 @@ void wIconUpdate(WIcon *icon, RImage *image)
/* Get the Pixmap from the WIcon */
get_rimage_icon_from_icon_win(icon);
} else if (wwin && wwin->net_icon_image) {
- /* Use _NET_WM_ICON icon */
- get_rimage_icon_from_x11(icon);
+ /* Remove the icon image */
+ unset_icon_image(icon);
+
+ /* Set the new icon image, use _NET_WM_ICON icon
+ * (same icon that the window) */
+ icon->file_image = RRetainImage(wwin->net_icon_image);
} else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags &
IconPixmapHint)) {
/* Get the Pixmap from the wm_hints, else, from the
user */
unset_icon_image(icon);
@@ -656,15 +659,6 @@ void update_icon_pixmap(WIcon *icon)
wIconPaint(icon);
}
-static void get_rimage_icon_from_x11(WIcon *icon)
-{
- /* Remove the icon image */
- unset_icon_image(icon);
-
- /* Set the new icon image */
- icon->file_image = RRetainImage(icon->owner->net_icon_image);
-}
-
static void get_rimage_icon_from_user_icon(WIcon *icon)
{
if (icon->file_image)
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].