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

The new helper function update_net_icon_image() changes the window
net_icon_image.

I splitted this image creation from updateIconImage() to better
understanding.
---
 src/wmspec.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/wmspec.c b/src/wmspec.c
index 4f0d4a8..28efc20 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -231,6 +231,8 @@ static void updateCurrentWorkspace(WScreen *scr);
 static void updateWorkspaceCount(WScreen *scr);
 static void wNETWMShowingDesktop(WScreen *scr, Bool show);
 
+static void update_net_icon_image(WWindow *wwin);
+
 typedef struct NetData {
        WScreen *scr;
        WReservedArea *strut;
@@ -485,7 +487,8 @@ RImage *get_window_image_from_x11(Window window)
        return image;
 }
 
-void updateIconImage(WWindow *wwin)
+/* This function refresh the net_icon_image, used by the window */
+static void update_net_icon_image(WWindow *wwin)
 {
        /* Remove the icon image from X11 */
        if (wwin->net_icon_image)
@@ -493,6 +496,12 @@ void updateIconImage(WWindow *wwin)
 
        /* Save the client image as window image */
        wwin->net_icon_image = get_window_image(wwin);
+}
+
+void updateIconImage(WWindow *wwin)
+{
+       /* Update the icon image used by the windows */
+       update_net_icon_image(wwin);
 
        /* Refresh the Window Icon */
        if (wwin->icon)
-- 
1.7.10.4


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

Reply via email to