check return code when setting utf8 workspace names
This commit is contained in:
parent
5ee7d3e72e
commit
e8a86fb91c
1 changed files with 7 additions and 4 deletions
11
src/Ewmh.cc
11
src/Ewmh.cc
|
@ -462,12 +462,15 @@ void Ewmh::updateWorkspaceNames(BScreen &screen) {
|
|||
}
|
||||
|
||||
#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)) {
|
||||
|
|
Loading…
Reference in a new issue