From 396f0d808e90e2d77f9bdf032e66feaad1840425 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Thu, 29 Oct 2020 14:06:23 +0800 Subject: [PATCH] Update unix_event_emitter.cpp --- nel/src/3d/driver/opengl/unix_event_emitter.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nel/src/3d/driver/opengl/unix_event_emitter.cpp b/nel/src/3d/driver/opengl/unix_event_emitter.cpp index 2945b90e7..fcb00b20e 100644 --- a/nel/src/3d/driver/opengl/unix_event_emitter.cpp +++ b/nel/src/3d/driver/opengl/unix_event_emitter.cpp @@ -699,22 +699,21 @@ bool CUnixEventEmitter::processMessage (XEvent &event, CEventServer *server) if (XGetWindowProperty(_dpy, _win, XA_NEL_SEL, 0, XMaxRequestSize(_dpy), False, AnyPropertyType, &actualType, &actualFormat, &nitems, &bytesLeft, (unsigned char**)&data) != Success) return false; - ucstring text; - std::string tmpData = (const char*)data; + std::string text = (const char*)data; XFree(data); // convert buffer to ucstring if (target == XA_UTF8_STRING) { - text = ucstring::makeFromUtf8(tmpData); + // OK } else if (target == XA_STRING) { - text = tmpData; + // FIXME: Convert local to UTF-8 } else { - nlwarning("Unknow format %u", (uint)target); + nlwarning("Unknown format %u", (uint)target); } // sent string event to event server