GNOME Bugzilla – Bug 528708
proposal of improvement on falling back immodule
Last modified: 2012-01-31 02:59:21 UTC
This proposal is regarding Bug 502446. I have requested the above change to switch immodule on demand against the request outside GTK+, particularly by imsettings (http://fedorahosted.org/im-chooser/wiki/IMSettings). After that, I realized that there are the case that can't disable the usage of immodule entirely, because of the order of fallback of immodule and we can't just use gtk-im-context-simple for that purpose. Current order of finding the appropriate immodule is: 1. pick up immodule from GTK_IM_MODULE if available 2. look at Gtk/IMModule on XSETTINGS 3. look for the preferred immodule from current locale For the above reason, if imsettings is supposed to disable the usage of immodule, 1 and 2 are skipped. and GTK+ will picks up immodule from current locale at step 3 because immodule is still available for current locale. So my suggestion is to have a boolean value on XSETTINGS to skip the step 3 as well if that key is turned on.
a) why can't gtkimcontextsimple be used ? b) I would recommend to simply define a value, like "none" for the setting that would turn off any further looking for an im module.
(In reply to comment #1) > a) why can't gtkimcontextsimple be used ? Specifying GTK_IM_MODULE=gtk-im-context-simple would makes harder to use other immodule usually being picked up by locale, such as im-ti-er, im-cedilla, im-am-et and so on. I'm not sure how many people using them though. > b) I would recommend to simply define a value, like "none" for the setting that > would turn off any further looking for an im module. works as alias to gtk-im-context-simple?
> works as alias to gtk-im-context-simple? No, I misunderstood what you want, probably. It is still not terribly clear to me Do you want to have a way for im-settings to ensure that _no_ input method is used ? Then you may have to add the "none" special-case I mentioned. Is the builtin input method close enough to 'none' ? If yes, use that. Can you try to clearly describe the problem you are trying to solve ? If it is that locale-specific immodules still get picked up when im-settings claims that input methods are disabled ? One way to solve that would be to simply move gtk's locale-specific immodules to a subpackage and not install them by default.
(In reply to comment #3) > Do you want to have a way for im-settings to ensure that _no_ input method is > used ? Then you may have to add the "none" special-case I mentioned. Not really. a way for imsettings to ensure that no _external_ input method is used. such as im-scim.so and im-uim.so and so on. > Is the builtin input method close enough to 'none' ? If yes, use that. > > Can you try to clearly describe the problem you are trying to solve ? > > If it is that locale-specific immodules still get picked up when im-settings > claims that input methods are disabled ? One way to solve that would be to > simply move gtk's locale-specific immodules to a subpackage and not install > them by default. And then set 'none' to disable input methods? this brings up to me that I have to resolve an issue how to deal with immodule on imsettings. talking about this here may be off-topic but I have no idea to manage two different settings between GTK+ and Qt say on imsettings. since there are no way to bridge GTK+ immodule to Qt and vice versa, people possibly may has different configuration on imsettings. but they can't do that now. Let me show you what happens on current imsettings when you do that: one is set FOO immodule for GTK+ on imsettings and not available on Qt. when they run Qt applications, they won't input their special characters expectedly and vice versa. Right now imsettings behaves something against XKB and set 'xim' to disable input methods. this works as non-GTK+ applications does but that would be appreciated if there are any way to do that without extra process running for people who don't really use input methods.
> Not really. a way for imsettings to ensure that no _external_ input method is > used. such as im-scim.so and im-uim.so and so on. The distinction between external and internal is not really meaningful here. Why does the simple builtin input method not work for you ? if im-settings sets that id in the xsetting, no 'external' input method will be used... Not sure how xkb comes into the picture here. This is all still fairly nebulous to me. I recommend using "gtk-im-context-simple" for the xsetting. GTK+ is the only consumer of that xsetting anyway, so you shouldn't have to worry about other toolkits picking it up and getting confused by the name. If and when other toolkits start looking at that xsetting, we can add "none" or "simple" or some other neutral alias for that id. I also repeat my proposal to split off the gtk immodules in their own subpackages in Fedora. Then people who don't really use input methods can simply get rid of them all by rpm -e.
This can be satisfied the changes of Bug#603559 now. *** This bug has been marked as a duplicate of bug 603559 ***