Re: [Q] Gtk+ is not working with Korean IM




Young-jae Chang <robocop@green.vivian.com> writes:

> [1  <text/plain; US-ASCII (7bit)>]
> 
> Hi~~~ I have problem with using Korean in Gtk+
> I'm using hanIM as Korean IM... 
> (It works well with Netscape and most I18Ned application 
>  except Gtk  :(  )
> You can get it from
> ftp://ftp.kaist.ac.kr//pub/hangul/mirror/www.mizi.co.kr/hanIM
>  - get two files hanIM-0.9-?.rpm and xfntmizi-1.1-1.rpm
>    install them and set LANG=ko ... and start hanIM
> 
> Gtk+ configure script has some problem too..
> glibc is not supporting 2bytes languages but configure think it does
> so it didn't DX_LOCALE flag.. 
> so you have to manualy set it (Makefile gdk/Makefile gtk/Makefile)
> add -DX_LOCALE ....

Are you running ./configure as:

 ./configure --with-locale=ko

./configure can't see the LANG environment variable, so need
to use the --with-locale option.
 
> i enclose test program and rc file...
> 
> first recompile gtk+ with -DX_LOCALE flag...
> compile gtkimtest.c
> run im 'hanIM&'
> run it './gtkimtest gtkimtest.rc'
> 
> you will see Korean charactor in a button (it means 'quit')
> press shift-space to switch to korean.. and type anything...
> nothing happen (to disconnect from IM press control-space)
> 
> I don't know much about I18N so... It's difficult to look gtk source
> some guy said to me the fix(?)
> 
> gdk.c    about line 750~760 in fuction gdk_event_get()
> 
> filter_status=XFilterEvent(&xevent,GDK_WINDOW_XWINDOW(xim_window));
> 
> change above line like below
> 
> filter_status=XFilterEvent(&xevent, None);
> 
> this worked 0.99.?  and i didn't test later versions...

This seems to be a bug in HanIM. (You can trigger it by modifying
the example programs that come with HanIM - in overspot.c, change:

    if (XFilterEvent(&event, None) == True)
to
    if (XFilterEvent(&event, window) == True)
)

If you just make the change to gdk_event_get(), you'll notice
that things work a bit strange. You can only type hangul in the
entry when the cursor is directly over the entry. Otherwise
you'll enter roman characters. I think this can be worked
around by modifiying GTK to use XNFocusWindow for the toplevel
window.

But there is also another bug. Over-the-spot entry doesn't work at all
in GTK with HanIM. To enter any Korean text, you need to run the GTK+
program as

 program --xim-preedit nothing

So that it uses the root-window preedit style. I don't know what is
causing this problem.

> can anyone tell me how to use hanIM correctly?
> Which is victim(?) hanIM or Gtk+ ?   (or me?)

Well, it is not you. I can't figure out what GTK could be doing
wrong. (And the IM support works fine with Japanese input methods).
But there probably is a bug somewhere in GTK.
 
> (sorry for my terrible english ...)

Better than my Korean ;-) 

Thanks for the report. I hope we get this working soon.

                                        Owen



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