[PATCH] wmaker: treat empty icon name hint as unset

0 views
Skip to first unread message

david.m...@gmail.com

unread,
Feb 12, 2026, 7:11:47 PM (12 days ago) Feb 12
to Window Maker Development
This patch is treating empty _NET_WM_ICON_NAME as unset,
thus the code is falling back to set the appicon title
to the window title. Case seen with virtualbox where
the _NET_WM_ICON_NAME(UTF8_STRING) is set to empty string.
---
 src/icon.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/icon.c b/src/icon.c
index 943e2d84..14278d2c 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -331,6 +331,14 @@ void wIconChangeTitle(WIcon *icon, WWindow *wwin)
  /* Set the new one, using two methods to identify
  the icon name or switch back to window name */
  icon->icon_name = wNETWMGetIconName(wwin->client_win);
+ if (icon->icon_name) {
+ /* treat empty string as unset */
+ if (icon->icon_name[0] == '\0') {
+ XFree(icon->icon_name);
+ icon->icon_name = NULL;
+ }
+ }
+
  if (!icon->icon_name)
  if (!wGetIconName(dpy, wwin->client_win, &icon->icon_name))
  icon->icon_name = wNETWMGetWindowName(wwin->client_win);
--
2.43.0
0001-wmaker-treat-empty-icon-name-hint-as-unset.patch
Reply all
Reply to author
Forward
0 new messages