Bug 174143
Summary: | pre-edit buffer not emptied after IME deactivated | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Lawrence Lim <llim> |
Component: | scim | Assignee: | Jens Petersen <petersen> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | eng-i18n-bugs, james.su, qshen, tools-bugs |
Target Milestone: | --- | Keywords: | FutureFeature, i18n |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-03-17 09:18:52 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 150221, 167798 |
Description
Lawrence Lim
2005-11-25 04:01:33 UTC
I have talked with Su Zhe about this bug. He said this trigger hot key should be handled in IMEs. I think it means each IME should be update except it has handled this hot key. I wrote a test patch, just make IC reset when the IME is deactived. It seems work well. But Su Zhe think it's not a good way, because reset() has special usage. Below is my patch for reference : --- gtkimcontextscim.cpp.orig 2005-12-06 10:11:27.732624776 +0800 +++ gtkimcontextscim.cpp 2005-12-02 15:36:36.000000000 +0800 @@ -1256,8 +1256,10 @@ if (hotkey_action == SCIM_FRONTEND_HOTKEY_TRIGGER) { if (!ic->impl->is_on) turn_on_ic (ic); - else + else { turn_off_ic (ic); + ic->impl->si->reset(); //qshen + } ret = true; } else if (hotkey_action == SCIM_FRONTEND_HOTKEY_ON) { if (!ic->impl->is_on) I think it's better to handle this deactivate/activate hot key in frontend/gtkim moudle, because it's a global setting for frontend. We can set it in SCIM setup window | frontend | global setting. The common setting for this hot key is "Control+space". SCIM gtkim moudle names this hotkey as SCIM_CONFIG_HOTKEYS_FRONTEND_TRIGGER, and handles it in filter_hotkeys() . The X11 frontend has similar handling code for this hotkey. We konw that preedit string is managed by IC. Gtk-im transfer IC to SCIM, SCIM transfer IC to IME instance. IME can be accessed through IME APIs, but the only API to handle preedit string is reset() . So there are 2 choices to handle this bug. One is using reset() in frontend/gtkim module, Another is handling the hotkey in IME inside. I had a talk with James Su. He said the hotkey should be handled in IMEs. He didn't accepted editing the front end module. This behaviour should be implemented in each IMEngine. When scim is deactivated, the focus_out () method will be invoked, then IMEngine may do anything in this method, for example clearing the preedit string. Thanks for the comment James. Are there any IMEs for which resetting pre-edit is not desirable? AFAIK, some input methods provided by upcoming scim-m17n with m17n 1.3.x have such behaviour. Patch has been reverted in Fedora devel since December. |