From 01b0c007800ebf1c35d2387eb081978901f9fd13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 3 Dec 2020 07:54:12 -0800 Subject: [PATCH] entry: Fixed X11 setWindowTitle to display UTF-8 properly. --- examples/common/entry/entry_x11.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/common/entry/entry_x11.cpp b/examples/common/entry/entry_x11.cpp index 16d6b124d..a1b3137b2 100644 --- a/examples/common/entry/entry_x11.cpp +++ b/examples/common/entry/entry_x11.cpp @@ -746,7 +746,10 @@ namespace entry { Display* display = s_ctx.m_display; Window window = s_ctx.m_window[_handle.idx]; - XStoreName(display, window, _title); + + XTextProperty tp; + Xutf8TextListToTextProperty(display, (char**)&_title, 1, XUTF8StringStyle, &tp); + XSetWMName(display, window, &tp); } void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled)