Summary: | uim-svn1643: uim-xim doesn't work | ||
---|---|---|---|
Product: | UIM | Reporter: | UTUMI Hirosi <utuhiro78> |
Component: | bridge: XIM | Assignee: | uim-bugs |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
UTUMI Hirosi
2004-11-14 19:13:09 UTC
Check XMODIFIERS environ variable. For preparation of 0.4.6, I deleted old-style XMODIFIERS=@im=uim-foobar ximserver registration. If you use this old-style XMODIFIERS variable, please use XMODIFIERS=@im=uim instead. I'm using LANG=ja_JP, XMODIFIERS=@im=uim. uim-xim always uses "uim-direct" on startup. I ran uim-im-sw and changed "uim-direct" to "uim-anthy", now I can type Japanese. uim-immodule always uses "uim-anthy" on startup in ja_JP. I think uim-xim shouldn't use uim-direct on startup in ja_JP. OK. Thanks for reporting. I can reproduce the bug. I think this is not a bug in uim-xim. uim-xim uses proper way to get default im using uim_get_default_im_name(). This seems like bug in scm or siod level, since getting () if I input (uim-get-default-im-name "ja_JP") in uim-sh. Oops, please ignore last message about uim-sh. Returning () is OK with uim-get-default-im-name. OK. Now I understand the reason of getting "direct" with uim-xim. Recently YamaKen modified im.scm to recored latest IM to default-im-name. This change causes getting "direct" while using uim_get_default_im_name() after creating uim context with NULL uim_create_context() with NULL is invoked to get all the im available from libuim to store uim's information into uim-xim. I don't think it good idea to store im's info if bridge create context with NULL, or my usage of uim_create_context() is no longer supported? What do you think about this, Tokunaga-san? The temporal fix of the bug is applying following patch. Index: im.scm =================================================================== --- im.scm (revision 1644) +++ im.scm (working copy) @@ -205,7 +205,8 @@ ;; To remember the IM selected by uim-toolbar, we record the ;; latest IM to default-im-name. This makes subsequent contexts ;; the selected one. -- YamaKen 2004-11-11 - (set! default-im-name (im-name im)) + (if name + (set! default-im-name (im-name im))) (im-set-encoding id (im-encoding im)) (update-style uim-color-spec (symbol-value uim-color)) (let* ((handler (im-init-handler im)) I suggest another workaround. It will reduce unwanted behavior for uim-xim. Etsushi, please test it. Index: scm/im.scm =================================================================== --- scm/im.scm (revision 1644) +++ scm/im.scm (working copy) @@ -202,10 +202,6 @@ (arg (and im (im-init-arg im)))) (if (find-context id) (release-context id)) - ;; To remember the IM selected by uim-toolbar, we record the - ;; latest IM to default-im-name. This makes subsequent contexts - ;; the selected one. -- YamaKen 2004-11-11 - (set! default-im-name (im-name im)) (im-set-encoding id (im-encoding im)) (update-style uim-color-spec (symbol-value uim-color)) (let* ((handler (im-init-handler im)) Index: uim/uim.c =================================================================== --- uim/uim.c (revision 1644) +++ uim/uim.c (working copy) @@ -248,6 +248,13 @@ uc->short_desc = uim_return_str; uim_return_str = NULL; /* ownership has been transferred */ #endif + + /* + To remember the IM selected by uim-toolbar, we record the latest + IM to default-im-name. This makes subsequent contexts the + selected one. -- YamaKen 2004-11-11 + */ + UIM_EVAL_FSTRING1(uc, "(set! default-im-name '%s)", engine); } void Works fine. I also think handling this in IM-swithing is more appropriate than in context creation. > I also think handling this in IM-swithing is more appropriate than in context
> creation.
Me too. Okay, I'll commit it.
Fixed in r1645. ------------------------------------------------------------------------ r1645 | yamaken | 2004-11-15 16:20:12 +0900 (Mon, 15 Nov 2004) | 11 lines * This commit fixes an unwanted and inappropriate behavior for uim-xim added in r1633, and also fixes bug #1853. * scm/im.scm - (create-context): Remove default-im-name modification based on the passed im-name added in r1633. * uim/uim.c - (uim_switch_im): Add the default-im-name modification based on the passed im-name moved from create-context. This is the appropriate responsibility separation. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.