Comment #7 on issue 1099 by takao.fujiwara1: ibus-anthy does not implement XmbResetIC, XwcResetIC or Xutf8ResetIC
http://code.google.com/p/ibus/issues/detail?id=1099

Revised the patch:
http://github.com/fujiwarat/ibus/commit/0d15eb08f66ec45fd95dc54e2ac8d6e7b7b62a02

1. Removed the change of bus/inputcontext.c
After we discussed internally, it was suggested to return the string only when ibus preedit is x11. I think xterm assigns XIMPreeditPosition with XNInputStyle and the preedit is gtk so ResetIC always returns NULL in xterm in this suggestion. It means your application will need to set XIMPreeditCallbacks with XNInputStyle and define a custom drawing function with XNPreeditDrawCallback if you wish to get string from ResetIC().
We think ResetIC returns NULL in case gtk preedit is used.
From man page:

If there is no visible preedit text, then it is input method
implementation-dependent whether these procedures return a non-NULL string or NULL.

2. I forgot to free x11 preedit string when ResetIC() is called.
+        g_free(x11ic->preedit_string);
+        x11ic->preedit_string = NULL;


--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en

回复