Can't change dockapp icon.

94 views
Skip to first unread message

Wyatt Goettsch

unread,
Sep 29, 2019, 12:54:50 AM9/29/19
to Window Maker Users
I'm trying to change my dockapp icons for some programs like firefox by changing the Icon Image in Docked Application settings, but every time the icon is automatically reset to the default firefox icon for some reason. What is the procedure for changing dockapp icons can I use to prevent this?

Torrance, Douglas

unread,
Sep 29, 2019, 6:57:12 AM9/29/19
to Window Maker Users
On Sun, Sep 29, 2019 at 12:54 AM Wyatt Goettsch <wyatt.g...@gmail.com> wrote:
I'm trying to change my dockapp icons for some programs like firefox by changing the Icon Image in Docked Application settings, but every time the icon is automatically reset to the default firefox icon for some reason. What is the procedure for changing dockapp icons can I use to prevent this?

Right click on the titlebar, select "Attributes...", then "Icon and Initial Workspace" from the dropdown menu.  There's be a checkbox for "Ignore client supplied icon" that should work.

Wyatt Goettsch

unread,
Sep 29, 2019, 10:14:16 AM9/29/19
to Window Maker Users
This does not work. The icon changes back as soon as I close the Attributes window after saving.

On Sunday, September 29, 2019 at 3:57:12 AM UTC-7, Torrance, Douglas wrote:

Holger Sebert

unread,
Aug 3, 2021, 2:35:55 PM8/3/21
to Window Maker Users
Hi!

Same problem here: Firefox and Thunderbird switch back to their original (built-in?) icon as soon as I start them. Setting the icon by changing the Window Attributes and selecting "Ignore Client Supplied Icon" does not work.

I would really like to fix this. Does anybody know?

Best,
Holger

Russ Button

unread,
Aug 3, 2021, 3:35:24 PM8/3/21
to Holger Sebert, Window Maker Users
I use the icon settings tool to select a given icon image.   Just to be on the safe side, you might want to also do a "Save Workplace State" when you next exit.

--
You received this message because you are subscribed to the Google Groups "Window Maker Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wmaker-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wmaker-user/3b76c4d8-c553-4c29-b706-29ebc0cce920n%40googlegroups.com.

Holger Sebert

unread,
Aug 3, 2021, 4:28:49 PM8/3/21
to Window Maker Users
Hi Russ! Could you please be more specific what exact tool you are using? Is it part of WPrefs?

Holger Sebert

unread,
Aug 4, 2021, 6:20:02 PM8/4/21
to Window Maker Users
The problem is that the "always_user_icon" is only evaluated for application windows (and not windows in the dock). Mozilla (and others) supply a different icon as soon as they are launched and override the icon in the dock. (Internally this is a "NET_WM_ICON" which overrides the settings supplied by the user).

Is it a bug? Is it a feature?

A solution would be to let the user supplied icon always take precedence over all icon sources. Here is a quick patch which solves the problem:

diff --git a/src/icon.c b/src/icon.c
index 6f5f02e9..e16027cd 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -62,7 +62,7 @@ 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 void get_rimage_icon_from_user_icon(WIcon *icon);
+static Bool 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);
 
@@ -636,28 +636,31 @@ void set_icon_minipreview(WIcon *icon, RImage *image)
 void wIconUpdate(WIcon *icon)
 {
     WWindow *wwin = NULL;
+    Bool user_icon_found;
 
     if (icon && icon->owner)
         wwin = icon->owner;
 
-    if (wwin && WFLAGP(wwin, always_user_icon)) {
-        /* 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);
-    } else if (wwin && wwin->net_icon_image) {
-        /* Use _NET_WM_ICON icon */
-        get_rimage_icon_from_x11(icon);
-    } 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);
-        icon->file_image = get_rimage_icon_from_wm_hints(icon);
-        if (!icon->file_image)
-            get_rimage_icon_from_user_icon(icon);
-    } else {
-        /* Get the Pixmap from the user */
-        get_rimage_icon_from_user_icon(icon);
+    user_icon_found = get_rimage_icon_from_user_icon(icon);
+
+    /* If no user icon was found, try to acquire an icon by other means. */
+    if (!user_icon_found) {
+        if (icon->icon_win != None) {
+            /* 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);
+        } else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) {
+            /* Get the Pixmap from the wm_hints, else, use default */
+            unset_icon_image(icon);
+            icon->file_image = get_rimage_icon_from_wm_hints(icon);
+            if (!icon->file_image)
+                get_rimage_icon_from_default_icon(icon);
+        } else {
+            /* Get the default image */
+            get_rimage_icon_from_default_icon(icon);
+        }
     }
 
     update_icon_pixmap(icon);
@@ -698,12 +701,13 @@ static void get_rimage_icon_from_x11(WIcon *icon)
     icon->file_image = RRetainImage(icon->owner->net_icon_image);
 }
 
-static void get_rimage_icon_from_user_icon(WIcon *icon)
+static Bool get_rimage_icon_from_user_icon(WIcon *icon)
 {
     if (icon->file_image)
-        return;
+        return True;
 
     get_rimage_icon_from_default_icon(icon);
+    return False;
 }
 
 static void get_rimage_icon_from_default_icon(WIcon *icon)

Reply all
Reply to author
Forward
0 new messages