Pārlūkot izejas kodu

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

possible. Thanks!
Christoph Lohmann 12 gadi atpakaļ
vecāks
revīzija
c5dd7fb377
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      st.c

+ 4 - 1
st.c

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