On 1/26/16 7:48 AM, Akihiro Sagawa wrote:
On Mon, 25 Jan 2016 09:10:59 -0600, Aric Stewart wrote:
I dont know if reverting right away is the right path, did you explore adding XIMStatusCallbacks to the XCreateIC call?
I tried XIMStatusCallbacks today. But, most of XIM servers don't support XIMStatusCallbacks. I tried Fcitx, IBus and uim and checked SCIM source codes. My callback stubs aren't called at all (or I did wrong way).
If not, then is there a way to detect that XNPreeditStartCallback is not being utilized? Maybe have a flag or something that gets set in addition to the IME_SetOpenStatus call, then if we go straight into XIMPreEditStartCallback without having seen the PreeditStartCallback we do the opening automatically, like we did before, but without the revert?
Sure. I'll try this approach.
BTW, do you know an XIM server which supports XNPreeditStateNotifyCallback?
Thanks for comments, Akihiro Sagawa
I don't, my X11 xim knowledge is mostly current with kinput2 days. But Kusanagi-san generally has done good work in the past so I assume that this is needed for or improves something.
I was looking for a good way to query the xim as to what callbacks it supports, but again my X11 knowledge is old.
Maybe when we iterate over the styles in open_xim you can check if ((style & PREEDIT_MASK) == XIMPreeditCallbacks). That seems to indicate if the callbacks are supported. Maybe we need to select that style?
-aric