GNOME Bugzilla – Bug 690247
multiple context in a immodule can't be selected
Last modified: 2013-02-16 01:12:50 UTC
Some gtkimmodule supports multiple contexts. I use imhangul (http://code.google.com/p/imhangul/) and it supports 9 contexts. Below is the list of contexts. "/usr/lib/gtk-3.0/3.0.0/immodules/im-hangul.so" "hangul2" "Hangul Dubeolsik" "im-hangul-3.0" "/usr/share/locale" "ko" "hangul2y" "Hangul Dubeolsik Yetgeul" "im-hangul-3.0" "/usr/share/locale" "" "hangul39" "Hangul Sebeolsik 390" "im-hangul-3.0" "/usr/share/locale" "" "hangul3f" "Hangul Sebeolsik Final" "im-hangul-3.0" "/usr/share/locale" "" "hangul3s" "Hangul Sebeolsik Noshift" "im-hangul-3.0" "/usr/share/locale" "" "hangul3y" "Hangul Sebeolsik Yetgeul" "im-hangul-3.0" "/usr/share/locale" "" "hangul32" "Hangul Sebeolsik Dubeol Layout" "im-hangul-3.0" "/usr/share/locale" "" "hangulro" "Hangul Romaja" "im-hangul-3.0" "/usr/share/locale" "" "hangulahn" "Hangul Ahnmatae" "im-hangul-3.0" "/usr/share/locale" "" I set GTK_IM_MODULE as "hangul3f" but it always set as "hangulahn". I found the reason that lookup_immodule() in gtkimmodule.c always return first context of immodule. I will attach a patch, please apply this.
Created attachment 231615 [details] [review] check requested context in immodule
*** Bug 693680 has been marked as a duplicate of this bug. ***
Created attachment 235859 [details] [review] better way to get the context ID than checking the whole contexts Better patch from bug 693680, using g_hash_table_lookup_extended().
Looks reasonable to me (but I haven't tried it)
Review of attachment 235859 [details] [review]: .