Applying the patch of the little girl <yui@blekksprut.net> to make cjk input

possible. Thanks!
This commit is contained in:
Christoph Lohmann 2012-10-28 13:37:11 +01:00
parent b56a0da283
commit c5dd7fb377
1 changed files with 4 additions and 1 deletions

5
st.c
View File

@ -2602,9 +2602,11 @@ xseturgency(int add) {
void void
focus(XEvent *ev) { focus(XEvent *ev) {
if(ev->type == FocusIn) { if(ev->type == FocusIn) {
XSetICFocus(xw.xic);
xw.state |= WIN_FOCUSED; xw.state |= WIN_FOCUSED;
xseturgency(0); xseturgency(0);
} else { } else {
XUnsetICFocus(xw.xic);
xw.state &= ~WIN_FOCUSED; xw.state &= ~WIN_FOCUSED;
} }
} }
@ -2774,7 +2776,7 @@ run(void) {
while(XPending(xw.dpy)) { while(XPending(xw.dpy)) {
XNextEvent(xw.dpy, &ev); XNextEvent(xw.dpy, &ev);
if(XFilterEvent(&ev, xw.win)) if(XFilterEvent(&ev, None))
continue; continue;
if(handler[ev.type]) if(handler[ev.type])
(handler[ev.type])(&ev); (handler[ev.type])(&ev);
@ -2849,6 +2851,7 @@ main(int argc, char *argv[]) {
run: run:
setlocale(LC_CTYPE, ""); setlocale(LC_CTYPE, "");
XSetLocaleModifiers("");
tnew(80, 24); tnew(80, 24);
xinit(); xinit();
ttynew(); ttynew();