[hackers] [st] Applying the patch of the little girl <yui_AT_blekksprut.net> to make cjk input || Christoph Lohmann

From: <hg_AT_suckless.org>
Date: Sun, 28 Oct 2012 13:39:05 +0100 (CET)

changeset: 371:0dcc2174e8ec
tag: tip
user: Christoph Lohmann <20h_AT_r-36.net>
date: Sun Oct 28 13:37:11 2012 +0100
files: st.c
description:
Applying the patch of the little girl <yui_AT_blekksprut.net> to make cjk input
possible. Thanks!


diff -r 127e792e5a3e -r 0dcc2174e8ec st.c
--- a/st.c Sun Oct 28 13:35:00 2012 +0100
+++ b/st.c Sun Oct 28 13:37:11 2012 +0100
_AT_@ -2602,9 +2602,11 @@
 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;
         }
 }
_AT_@ -2774,7 +2776,7 @@
 
                 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);
_AT_@ -2849,6 +2851,7 @@
 
 run:
         setlocale(LC_CTYPE, "");
+ XSetLocaleModifiers("");
         tnew(80, 24);
         xinit();
         ttynew();
Received on Sun Oct 28 2012 - 13:39:05 CET

This archive was generated by hypermail 2.3.0 : Sun Oct 28 2012 - 13:48:34 CET