aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2007-05-05 22:21:35 (GMT)
committermarkt <markt>2007-05-05 22:21:35 (GMT)
commit008685a90ee1d32b422f7d39011de8a6282d41e5 (patch)
tree57e14c53a0c33991a737c53618e0d75bcbc69fe4 /src
parentdb2904e1445bfe09c7ea55e2d67f4e51aeca292f (diff)
downloadfluxbox-008685a90ee1d32b422f7d39011de8a6282d41e5.zip
fluxbox-008685a90ee1d32b422f7d39011de8a6282d41e5.tar.bz2
fixing return value checks for utf8 strings
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/FbWindow.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index 926abfd..1dba746 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -465,7 +465,7 @@ void FbWindow::reparent(const FbWindow &parent, int x, int y, bool continuing) {
465std::string FbWindow::textProperty(Atom property) const { 465std::string FbWindow::textProperty(Atom property) const {
466 XTextProperty text_prop; 466 XTextProperty text_prop;
467 char ** stringlist = 0; 467 char ** stringlist = 0;
468 int count; 468 int count = 0;
469 std::string ret; 469 std::string ret;
470 470
471 static Atom m_utf8string = XInternAtom(display(), "UTF8_STRING", False); 471 static Atom m_utf8string = XInternAtom(display(), "UTF8_STRING", False);
@@ -492,7 +492,8 @@ std::string FbWindow::textProperty(Atom property) const {
492 ret = stringlist[0]; 492 ret = stringlist[0];
493 } else { 493 } else {
494 // still returns a "StringList" despite the different name 494 // still returns a "StringList" despite the different name
495 if (XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count) == 0 || count == 0) 495 XmbTextPropertyToTextList(display(), &text_prop, &stringlist, &count);
496 if (count == 0)
496 return ""; 497 return "";
497 498
498 ret = FbStringUtil::LocaleStrToFb(stringlist[0]); 499 ret = FbStringUtil::LocaleStrToFb(stringlist[0]);