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

The function applySettings() at winspector window includes all
the client possible images:

The image form the client wm_net_icon (get_window_image_from_x11()),
else, the image form the wm_hints (get_wwindow_image_from_wm_hints())
These images are stored at wwin->net_icon_image.

But if is NULL, applySettings uses get_window_image and
not get_window_image_def, because they call wIconUpdate and
if get_window_image() returns NULL, the icon is provided by wIconUpdate
and could be not the default icon.
---
 src/winspector.c |    4 ++--
 src/wmspec.c     |    7 ++-----
 src/wmspec.h     |    2 ++
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/winspector.c b/src/winspector.c
index 3e6fe1f..bbbefd1 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -795,11 +795,11 @@ static void applySettings(WMButton *button, 
InspectorPanel *panel)
                } else {
                        /* Change icon image if the app is minimized */
                        if (wwin->icon)
-                               wIconUpdate(wwin->icon, 
get_window_image_from_x11(wwin->client_win));
+                               wIconUpdate(wwin->icon, get_window_image(wwin));
 
                        /* Change App Icon image */
                        if (wapp->app_icon)
-                               wIconUpdate(wapp->app_icon->icon, 
get_window_image_from_x11(wwin->client_win));
+                               wIconUpdate(wapp->app_icon->icon, 
get_window_image(wwin));
                }
 
                if (file)
diff --git a/src/wmspec.c b/src/wmspec.c
index d80e24f..a261ef9 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -231,9 +231,6 @@ static void updateCurrentWorkspace(WScreen *scr);
 static void updateWorkspaceCount(WScreen *scr);
 static void wNETWMShowingDesktop(WScreen *scr, Bool show);
 
-static RImage *get_window_image(WWindow *wwin);
-static RImage *get_window_image_def(WWindow *wwin);
-
 typedef struct NetData {
        WScreen *scr;
        WReservedArea *strut;
@@ -423,7 +420,7 @@ static RImage *makeRImageFromARGBData(unsigned long *data)
        return image;
 }
 
-static RImage *get_window_image(WWindow *wwin)
+RImage *get_window_image(WWindow *wwin)
 {
        RImage *image = NULL;
 
@@ -440,7 +437,7 @@ static RImage *get_window_image(WWindow *wwin)
        return image;
 }
 
-static RImage *get_window_image_def(WWindow *wwin)
+RImage *get_window_image_def(WWindow *wwin)
 {
        /* The window image is stored at window->net_icon_image
         * because get_window_image() sets it there, return it */
diff --git a/src/wmspec.h b/src/wmspec.h
index 5bb26f0..7fecf67 100644
--- a/src/wmspec.h
+++ b/src/wmspec.h
@@ -46,4 +46,6 @@ char *wNETWMGetWindowName(Window window);
 void wNETFrameExtents(WWindow *wwin);
 void wNETCleanupFrameExtents(WWindow *wwin);
 RImage *get_window_image_from_x11(Window window);
+RImage *get_window_image(WWindow *wwin);
+RImage *get_window_image_def(WWindow *wwin);
 #endif
-- 
1.7.10.4


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

Reply via email to