--- a/ewmhints.c 2019-06-04 16:53:13.000000000 +0000 +++ b/ewmhints.c 2019-06-04 17:13:46.754374082 +0000 @@ -405,11 +405,17 @@ ewmh_move_to_desktop(Window wnd, unsigne void ewmh_set_wm_name(Window wnd, const char *title) { - int len; + int len, res; + XTextProperty property; - len = strlen(title); - XChangeProperty(g_display, wnd, g_net_wm_name_atom, g_utf8_string_atom, - 8, PropModeReplace, (unsigned char *) title, len); + res = XmbTextListToTextProperty(g_display, (char**)&title, 1, XCompoundTextStyle, &property); + if (res == Success) { + XSetWMName(g_display, wnd, &property); + } else { + len = strlen(title); + XChangeProperty(g_display, wnd, g_net_wm_name_atom, g_utf8_string_atom, + 8, PropModeReplace, (unsigned char *) title, len); + } } void