[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Three problems with Chinput



On Tue, 29 Apr 2003, Stefan Baums wrote:

>    1. Chinput does not play nice with xterm.  When I open an xterm
>       with chinput running in the background, xterm and chinput
>       together will consume ca. 20% CPU time doing nothing at

This reminded me that I used to have the same problem with xterm back
about two years ago. I had a fix and probably forgot to submit to the
upstream. I attach the patch at the end. It's against a very old version
of xterm (I have stopped using and following xterm for quit a while). Hope
it can be applied cleanly and fix your problem.

>       all.  When I have TWO xterms open with chinput in the
>       background, and then hit CTRL-SPACE in one of them to enter
>       some Chinese, the chinput selection box will appear in xterm
>       no. 1, then no. 2, then no. 1 again, and so on flickering
>       away in rapid succession while X's CPU usage goes up to
>       70%.  This can't really be caught in a screenshot, but
> 
>          http://staff.washington.edu/baums/xterm.png
> 
>       shows two xterms open with the chinput selection box for a
>       split-second appearing in the non-active one where I DIDN'T
>       press CTRL-SPACE.

This one I have never seen. Just tried on a rh9 machine and couldn't
reproduce your problem. Will need more research later.

> 
>    2. I would like to bind the activation of Chinese input to some
>       other key combination than CTRL-SPACE because CTRL-SPACE is
>       (constantly!) used in Emacs to set the mark, and it is very
>       annoying indeed when chinput takes over that key
>       combination.  How can I do that?

I don't think there's a way of doing it other than modifying the source 
code.

> 
>    3. The font used in chinput's character selection box is a
>       simplified font.  I am however working in a traditional
>       Chinese locale, and would like the selection box to use a
>       font with traditional characters.  How can I specify that?

Are you sure that you are using one of the traditional hanzi input method?
Try using Ctrl-Shift to switch input method see if you can get one with
traditional characters.

regards,
rigel
-- 
| This message was re-posted from debian-chinese-gb@lists.debian.org
| and converted from gb2312 to big5 by an automatic gateway.
diff -Naur xc.orig/programs/xterm/charproc.c xc/programs/xterm/charproc.c
--- xc.orig/programs/xterm/charproc.c	Fri Jan 25 23:56:55 2002
+++ xc/programs/xterm/charproc.c	Sat Jan 26 02:24:44 2002
@@ -2546,15 +2546,15 @@
 	    if(screen->cursor_state)
 		HideCursor();
 	    ShowCursor();
+#if OPT_INPUT_METHOD
+	    PreeditPosition(screen);
+#endif
 	} else if(screen->cursor_set != screen->cursor_state) {
 	    if(screen->cursor_set)
 		ShowCursor();
 	    else
 		HideCursor();
 	}
-#if OPT_INPUT_METHOD
-	PreeditPosition(screen);
-#endif
 
 	if (QLength(screen->display)){
 	    select_mask = X_mask;
@@ -2624,15 +2624,15 @@
 	    if (screen->cursor_state)
 		HideCursor();
 	    ShowCursor();
+#if OPT_INPUT_METHOD
+	    PreeditPosition(screen);
+#endif
 	} else if (screen->cursor_set != screen->cursor_state) {
 	    if (screen->cursor_set)
 		ShowCursor();
 	    else
 		HideCursor();
 	}
-#if OPT_INPUT_METHOD
-	PreeditPosition(screen);
-#endif
 
 	XFlush(screen->display); /* always flush writes before waiting */
 
-- 
| This message was re-posted from debian-chinese-gb@lists.debian.org
| and converted from gb2312 to big5 by an automatic gateway.

Reply to: