Great Circle Associates

XCIN Mail-list
(August 2000)


Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Run with Chinese IME(xcin, CLE) browser hangs.:My platfor
From: Tung-Han Hsieh <thhsieh@twcpro.phys.ntu.edu.tw>
Date: Wed, 16 Aug 2000 11:45:37 +0800
To: "Huei_ru, Chen (Cathy Chen)" <cathy@mitux.tatung.com.tw>
Reply-To: xcin@linux.org.tw
User-Agent: Mutt/1.0.1i

On Thu, Apr 27, 2000 at 06:11:34PM +0800, Huei_ru, Chen (Cathy Chen) wrote:
> Hi,
> 
> Sorry, I haven't report this bug to you yet.
> 
>  I used xcin2.5.1-5, which is download form xcin.linux.org.tw.
> I test in M15 & the recently nightly builds of mozilla.
> The mozilla browser will hangs(freeze) when you set keyboard/mouse focus in the
> location bar.
> I have registered this bug in buzilla(mozilla bug system).
> Please reference:
> http://bugzilla.mozilla.org/show_bug.cgi?id=36651

Dear Huei_ru, and all the participants who working on Mozilla,

Very sorry for being replying late. And thank you very much for your report.

> The mozilla-i18n team fixed its IME bug in M16(2000-04-26-08-M16) after I reported but
> found there is still a bug in xcin.
> The previous mail CCed to you contains the gdb debug message when xcin runs with this
> build.
> Originally, they want to workaround this problem but found they can't because they
> found mozilla browser is waiting reply from xcin when excutes XGetICValues() that
> makes mozilla freezes.

This problem of xcin is now fixed. Please check:

http://xcin.linux.org.tw/pub/xcin/xcin/devel/xcin-2.5.2-pre4.tar.gz

I have test it with Mozilla M16/M17, and they seems worked fine.


However, I found 2 problems in Mozilla M16/M17 XIM part:

1. Mozilla seems still have so-called "X11R5 limitation", just like Netscape
   communicators. I mean:

   a. The XIM server MUST start before Mozilla, otherwise Mozilla cannot make
      connection with the XIM server.

   b. During the connection, the XIM server should NOT quit, otherwise this
      will lead to serious problem on Mozilla such as the Mozilla will just
      hang, or memory fault, or bus error.

   All of this problem can be solved by the X11R6 programming style. In 
   short, when making the connection to the XIM server, the client should 
   not use XOpenIM() directly, instead it should use 

	XRegisterIMInstantiateCallback()

   to register an initial connecting function to Xlib. Then if Xlib find a
   valid XIM server is available, it will call the initial connecting 
   function to make the connection to the XIM server. So the problem a. could
   be solved.

   In the initial connecting function, the client should use XSetIMValues()
   function to register a destroy_callback function to Xlib. Then when Xlib
   suddently discover that the connecting XIM server is unavailable, it will
   use the destroy_callback function to notify the client, then the client
   can do something to prevent the serious problems occure in b.


2. When input focus is changed, the Mozilla XIC ssems not report to the XIM
   server.

   I mean, initially my keyboard input focus is on window A (which is not
   part of Mozilla; it is just another XIM client). Now I click my mouse
   to change the input focus to one of the input window of Mozilla, the 
   Mozilla window HAVE TO call  XSetICFocus()  to report this event to the
   XIM server. And, if I click my mouse to other window and change the
   input focus, that Mozilla window HAVE TO call  XUnsetICFocus()  to report
   this event, too. Otherwise the XIM server will have difficulty to keep
   trace the statuses of different XIM clients.


These are the major problem I found up to now. I suggest that you could 
look into these and try to work around on them. In the xcin source code
(such as xcin-2.5.2-pre4.tar.gz I just mentioned) there is a very simple
XIM client:

	xcin-2.5/src/util/testprog/testprog.c

which could serve as an example on XIM programming. It does not have the
problems I mentioned above. So you can take a look at it if you need.


Best Regards,

T.H.Hsieh
To Unsubscribe: send mail to majordomo@linux.org.tw
with "unsubscribe xcin" in the body of the message

Indexed By Date Previous: Re: The XCIN IM tables
From: thhsieh@linux.org.tw
Next: Re: [cle-devel] Re: The XCIN IM tables
From: Anthony Fok <foka@debian.org>
Indexed By Thread Previous: [Update] xcin-2.5.2-pre4a.tar.gz
From: thhsieh@linux.org.tw
Next: Re: Run with Chinese IME(xcin, CLE) browser hangs.:My platfor
From: Hidetoshi Tajima <hidetoshi.tajima@eng.sun.com>