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

Yichao Yu yyc1992 at gmail.com
Thu Jan 31 12:14:41 PST 2013


On Thu, Jan 31, 2013 at 3:06 PM, Jan Arne Petersen
<jpetersen at openismus.com> wrote:
> On 31.01.2013 20:59, Yichao Yu wrote:
>> On Thu, Jan 31, 2013 at 2:50 PM, Jan Arne Petersen
>> <jpetersen at openismus.com> wrote:
>>> Currently the context is state-less but even when we add state there, in
>>> Qt, for example, there is currently just one input context per
>>> application not one per widget.
>>
>> The whole point is not about distinguishing different clients, it's
>> about tracking the state. It doesn't matter how many input context an
>> application created, but the input method must be able to know if it
>> is dealing with a same input_context and restore states accordingly.
>> (well the client is able to destroy this by recreate a context
>> whenever it get focus but that is definitely a bug.) A state less
>> input method context is plain wrong.
>>
>> P.S. if you are looking at ibus-qt, you may want to have a look at
>> qt's xim and fcitx immodule, both of them create input context per
>> main window.
>
> Yes, I will look more into Chinese input methods soon, and we can still
> change the way input contexts are handled on input method side. The work
> is all done in Weston so we can experiment with it before it is moved to
> Wayland.

I would suggest having a one-to-one corresponding between text_model
and input_method_context, adding input_method_context::activate +
input_method_context::deactivate events for the text_model gain/lost
focus, having the input_method interface only dealing with
input_method_context creation and deletion (corresponding to
text_model creation and deletion), and I guess the
text_model::set_language request can be removed.

>
> --
> Jan Arne Petersen
> Openismus GmbH
> http://www.openismus.com
> _______________________________________________
> 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