ibus-x11 gets the preedit position from XNSpotLocation:
https://github.com/ibus/ibus/blob/master/client/x11/main.c#L295

Probably I think it would be better to refer xterm source codes.

Fujiwara

On Thu, Apr 20, 2017 at 10:40 AM, Sam Varshavchik
<sam.varshavc...@gmail.com> wrote:
> I'm trying to code my own XIM client, as a hobby. Based on XIM protocol
> specification, and XLIB documentation here's what I'm doing:
>
> 1. I am selecting the XIMPreeditPosition|XIMStatusNothing input style, the
> first style listed in queryInputStyle.
>
> 2. I am setting and updating spotLocation and area.
>
> However, ibus 1.5.14 always shows its preedit window below my main window,
> instead of near the "spotLocation" attribute. I am not getting any XIM_ERROR
> messages. XIM_SET_IC_VALUES, with each "spotLocation" and "area" attribute
> update, gets acknowledged without any complaints.
>
> Am I missing some detail, some required step that I need to make? Everything
> appears to be working fine; the input method is working, just that the
> preedit area is ignoring what I'm setting for the "spotLocation" attribute.
>
> One thing that wasn't quite clear to me is why the "area" attribute needs to
> be set. It seems that setting spotLocation alone would be sufficient
> information to inform the XIM server where in the focus window input is
> being entered; area seems to be redundant. I'm setting "area" to indicate
> where in the focuswindow the cursor is blinking, with "spotLocation" being
> its south-west corner. Also, my focuswindow and clientwindow is the same,
> it's just one large window.
>
> Thanks for any pointers.
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "ibus-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ibus-devel+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"ibus-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ibus-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

回复