[PATCH RFC] Add language and text-direction to text protocol

Yichao Yu yyc1992 at gmail.com
Thu Jan 31 09:50:27 PST 2013


On Thu, Jan 31, 2013 at 12:33 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> On 01/31/2013 08:44 AM, Jan Arne Petersen wrote:
>>
>> From: Jan Arne Petersen <jpetersen at openismus.com>
>>
>> The proposed API allows to send the language and text-direction for
>> inserted text from an input-method to an application.
>
>
> Can't direction be determined by using Unicode rules on the new text, with
> direction override characters if the default rules don't work. This will
> allow the input method to return mixed-mode text.
>
> This might require the client to send the input method a large block of
> "context", such as the entire current paragraph, so that it can figure out
> the best insertion text so the direction indicators are right. Since it
> seems to me this context is very useful for other parts of input methods
> this may be better than the alternative of the client having to figure out
> how to merge the UTF-8 insertion into the existing text.

Since the text (and the preedit) is displayed by the client, and the
commit_string event only commit a, err, string, I don't really think
either the client or the input method need to worry anything about the
text direction when handling commit_string (it shouldn't be more
complicated than pasting plain-text for the client). The only case I
think this may be useful is giving either the compositor or the input
method a hint to locate/display the input overlay window.

>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list