1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-19 17:23:33 +01:00

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.
This commit is contained in:
David Maciejak
2026-02-12 19:00:48 -05:00
committed by Carlos R. Mafra
parent c8174a4b2e
commit 260415eb42

View File

@@ -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);