diff options
Diffstat (limited to 'src/Xutil.cc')
-rw-r--r-- | src/Xutil.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Xutil.cc b/src/Xutil.cc index 429a9fb..840b106 100644 --- a/src/Xutil.cc +++ b/src/Xutil.cc | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include "FbTk/I18n.hh" | 27 | #include "FbTk/I18n.hh" |
28 | #include "FbTk/App.hh" | 28 | #include "FbTk/App.hh" |
29 | #include "FbTk/FbString.hh" | ||
29 | 30 | ||
30 | #include <X11/Xutil.h> | 31 | #include <X11/Xutil.h> |
31 | #include <X11/Xatom.h> | 32 | #include <X11/Xatom.h> |
@@ -35,7 +36,7 @@ using namespace std; | |||
35 | 36 | ||
36 | namespace Xutil { | 37 | namespace Xutil { |
37 | 38 | ||
38 | std::string getWMName(Window window) { | 39 | FbTk::FbString getWMName(Window window) { |
39 | 40 | ||
40 | if (window == None) | 41 | if (window == None) |
41 | return ""; | 42 | return ""; |
@@ -58,22 +59,22 @@ std::string getWMName(Window window) { | |||
58 | if ((XmbTextPropertyToTextList(display, &text_prop, | 59 | if ((XmbTextPropertyToTextList(display, &text_prop, |
59 | &list, &num) == Success) && | 60 | &list, &num) == Success) && |
60 | (num > 0) && *list) { | 61 | (num > 0) && *list) { |
61 | name = static_cast<char *>(*list); | 62 | name = FbTk::FbStringUtil::LocaleStrToFb(static_cast<char *>(*list)); |
62 | XFreeStringList(list); | 63 | XFreeStringList(list); |
63 | } else | 64 | } else |
64 | name = text_prop.value ? (char *)text_prop.value : ""; | 65 | name = text_prop.value ? FbTk::FbStringUtil::XStrToFb((char *)text_prop.value) : ""; |
65 | 66 | ||
66 | } else | 67 | } else |
67 | name = text_prop.value ? (char *)text_prop.value : ""; | 68 | name = text_prop.value ? FbTk::FbStringUtil::XStrToFb((char *)text_prop.value) : ""; |
68 | 69 | ||
69 | XFree(text_prop.value); | 70 | XFree(text_prop.value); |
70 | 71 | ||
71 | } else { // default name | 72 | } else { // default name |
72 | name = _FBTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME"); | 73 | name = FbTk::FbStringUtil::LocaleStrToFb(_FBTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME")); |
73 | } | 74 | } |
74 | } else { | 75 | } else { |
75 | // default name | 76 | // default name |
76 | name = _FBTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME"); | 77 | name = FbTk::FbStringUtil::LocaleStrToFb(_FBTEXT(Window, Unnamed, "Unnamed", "Default name for a window without a WM_NAME")); |
77 | } | 78 | } |
78 | 79 | ||
79 | return name; | 80 | return name; |