X11 unicode patch with non-xic variant (by coolman, untested)

git-svn-id: svn://ultimatepp.org/upp/trunk@667 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-11-23 17:29:32 +00:00
parent 95ea7e1b21
commit e18eecf822

View file

@ -173,8 +173,11 @@ void Ctrl::EventProc(XWindow& w, XEvent *event)
keysym = 0;
}
else {
XLookupString(&event->xkey, buff, 1, &keysym, NULL);
chr = *buff;
int len = XLookupString(&event->xkey, buff, sizeof(buff), &keysym, NULL);
buff[len] = 0;
chr = FromUtf8(buff, len)[0];
if(len > 1)
wtext = FromUtf8(buff, len);
}
if(keysym == XK_Control_L || keysym == XK_Control_R) {
keysym = XK_Control_L;