diff options
author | markt <markt> | 2006-12-31 22:13:31 (GMT) |
---|---|---|
committer | markt <markt> | 2006-12-31 22:13:31 (GMT) |
commit | e8a86fb91c5d51d748d2c782ee146b690756f2b7 (patch) | |
tree | b3167a0b1e1a945a78da20caddfdcac150b4e597 | |
parent | 5ee7d3e72e0cfdd7900eaef3b95c953abbb0bb04 (diff) | |
download | fluxbox-e8a86fb91c5d51d748d2c782ee146b690756f2b7.zip fluxbox-e8a86fb91c5d51d748d2c782ee146b690756f2b7.tar.bz2 |
check return code when setting utf8 workspace names
-rw-r--r-- | src/Ewmh.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 9a3665e..3942fb9 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -462,12 +462,15 @@ void Ewmh::updateWorkspaceNames(BScreen &screen) { | |||
462 | } | 462 | } |
463 | 463 | ||
464 | #ifdef X_HAVE_UTF8_STRING | 464 | #ifdef X_HAVE_UTF8_STRING |
465 | Xutf8TextListToTextProperty(FbTk::App::instance()->display(), | 465 | int code = Xutf8TextListToTextProperty(FbTk::App::instance()->display(), |
466 | names, number_of_desks, XUTF8StringStyle, &text); | 466 | names, number_of_desks, XUTF8StringStyle, &text); |
467 | XSetTextProperty(FbTk::App::instance()->display(), screen.rootWindow().window(), | 467 | if (code != XNoMemory && code != XLocaleNotSupported) { |
468 | &text, m_net_desktop_names); | 468 | XSetTextProperty(FbTk::App::instance()->display(), |
469 | screen.rootWindow().window(), | ||
470 | &text, m_net_desktop_names); | ||
469 | 471 | ||
470 | XFree(text.value); | 472 | XFree(text.value); |
473 | } | ||
471 | 474 | ||
472 | #else | 475 | #else |
473 | if (XStringListToTextProperty(names, number_of_desks, &text)) { | 476 | if (XStringListToTextProperty(names, number_of_desks, &text)) { |