From 260415eb42553f452b9049c55b0f5011fff1c218 Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Thu, 12 Feb 2026 19:00:48 -0500 Subject: [PATCH] wmaker: treat empty icon name hint as unset 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);