aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbWindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/FbWindow.cc')
-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]);