aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-10-28 13:37:11 +0100
committerChristoph Lohmann <20h@r-36.net>2012-10-28 13:37:11 +0100
commit32173a11b434cb381dc30e7db1f83bb9c6032eca (patch)
tree4f637d15df3f96329304e3071e0065e005ca03a8
parent7168d85f97abe826e2ba72ef5f3d32d9d4e30cdf (diff)
downloadst-patched-32173a11b434cb381dc30e7db1f83bb9c6032eca.tar.bz2
st-patched-32173a11b434cb381dc30e7db1f83bb9c6032eca.tar.xz
st-patched-32173a11b434cb381dc30e7db1f83bb9c6032eca.zip
Applying the patch of the little girl <yui@blekksprut.net> to make cjk input
possible. Thanks!
-rw-r--r--st.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/st.c b/st.c
index ebc9962..c4ff67c 100644
--- a/st.c
+++ b/st.c
@@ -2602,9 +2602,11 @@ xseturgency(int add) {
2602void 2602void
2603focus(XEvent *ev) { 2603focus(XEvent *ev) {
2604 if(ev->type == FocusIn) { 2604 if(ev->type == FocusIn) {
2605 XSetICFocus(xw.xic);
2605 xw.state |= WIN_FOCUSED; 2606 xw.state |= WIN_FOCUSED;
2606 xseturgency(0); 2607 xseturgency(0);
2607 } else { 2608 } else {
2609 XUnsetICFocus(xw.xic);
2608 xw.state &= ~WIN_FOCUSED; 2610 xw.state &= ~WIN_FOCUSED;
2609 } 2611 }
2610} 2612}
@@ -2774,7 +2776,7 @@ run(void) {
2774 2776
2775 while(XPending(xw.dpy)) { 2777 while(XPending(xw.dpy)) {
2776 XNextEvent(xw.dpy, &ev); 2778 XNextEvent(xw.dpy, &ev);
2777 if(XFilterEvent(&ev, xw.win)) 2779 if(XFilterEvent(&ev, None))
2778 continue; 2780 continue;
2779 if(handler[ev.type]) 2781 if(handler[ev.type])
2780 (handler[ev.type])(&ev); 2782 (handler[ev.type])(&ev);
@@ -2849,6 +2851,7 @@ main(int argc, char *argv[]) {
2849 2851
2850run: 2852run:
2851 setlocale(LC_CTYPE, ""); 2853 setlocale(LC_CTYPE, "");
2854 XSetLocaleModifiers("");
2852 tnew(80, 24); 2855 tnew(80, 24);
2853 xinit(); 2856 xinit();
2854 ttynew(); 2857 ttynew();