all repos — fluxbox @ e8a86fb91c5d51d748d2c782ee146b690756f2b7

custom fork of the fluxbox windowmanager

check return code when setting utf8 workspace names
markt markt
commit

e8a86fb91c5d51d748d2c782ee146b690756f2b7

parent

5ee7d3e72e0cfdd7900eaef3b95c953abbb0bb04

1 files changed, 7 insertions(+), 4 deletions(-)

jump to
M src/Ewmh.ccsrc/Ewmh.cc

@@ -462,12 +462,15 @@ strcpy(names[i], workspacenames[i].c_str());

} #ifdef X_HAVE_UTF8_STRING - Xutf8TextListToTextProperty(FbTk::App::instance()->display(), + int code = Xutf8TextListToTextProperty(FbTk::App::instance()->display(), names, number_of_desks, XUTF8StringStyle, &text); - XSetTextProperty(FbTk::App::instance()->display(), screen.rootWindow().window(), - &text, m_net_desktop_names); + if (code != XNoMemory && code != XLocaleNotSupported) { + XSetTextProperty(FbTk::App::instance()->display(), + screen.rootWindow().window(), + &text, m_net_desktop_names); - XFree(text.value); + XFree(text.value); + } #else if (XStringListToTextProperty(names, number_of_desks, &text)) {