Surrounding info from GtkIMContext with selection


I have got a question while working with Thai IM through the GtkIMContext

What should be the "cursor_index" in reply to the "retrieve-surrounding"
signal when the some text portion is selected?

My opinion is that returning the actual cursor position, regardless of
being the start or end of selection, is not appropriate. Rather, the
text widget should determine the start and end of selection and choose
one to return.

Since the selection is to be replaced by next committed text from IM,
it can be treated as a "wide" cursor. Whether returning the start or
end position is more useful depends on which part of info the IM is

For Thai IM, where significant info is to the left of cursor, the start
of selection is more useful. But some other IM's may care more for the
other side, making selection end more useful. (Is there any such IM?)

What should be decided for this?

Theppitak Karoonboonyanan

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]