Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
index 5fa43d721c57c078a7c7b1b42e8fe504982989e0..b876e177c7e94bfba6898d3433713f034b50ffe0 100644 |
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
@@ -574,22 +574,11 @@ |
PropModeReplace, |
reinterpret_cast<const unsigned char*>(utf8str.c_str()), |
utf8str.size()); |
- XTextProperty xtp; |
- char *c_utf8_str = const_cast<char *>(utf8str.c_str()); |
- const int err = |
- Xutf8TextListToTextProperty(xdisplay_, &c_utf8_str, 1, |
- XCompoundTextStyle, &xtp); |
- if (err != Success) { |
- const std::string ascii_str = base::UTF16ToASCII(title); |
- xtp.encoding = XA_STRING; |
- xtp.format = 8; |
- xtp.value = reinterpret_cast<unsigned char *> |
- (const_cast<char *>(ascii_str.c_str())); |
- xtp.nitems = ascii_str.size(); |
- XSetWMName(xdisplay_, xwindow_, &xtp); |
- } else { |
- XSetWMName(xdisplay_, xwindow_, &xtp); |
- } |
+ // TODO(erg): This is technically wrong. So XStoreName and friends expect |
+ // this in Host Portable Character Encoding instead of UTF-8, which I believe |
+ // is Compound Text. This shouldn't matter 90% of the time since this is the |
+ // fallback to the UTF8 property above. |
+ XStoreName(xdisplay_, xwindow_, utf8str.c_str()); |
return true; |
} |