[PATCH wayland-protocols v5] text: Create second version of text input protocol

Jan Arne Petersen janarne at gmail.com
Sat Mar 26 12:22:45 UTC 2016


On Fri, Mar 25, 2016 at 8:16 AM Daiki Ueno <ueno at gnu.org> wrote:

> Hello,
>
> Jan Arne Petersen <janarne at gmail.com> writes:
>
> > There is a reference implementation of this version of the protocol in
> QtWayland
> > https://codereview.qt-project.org/#/c/153711/ where the text-input
> protocol is used to proxy the
> > Qt input method of Qt Wayland clients to the Qt input method on
> compositor side.
>
> Thanks, it is helpful to understand the protocol while rebasing the
> gtk+/mutter patches.
>
> I have a few comments on the protocol:
>
> > +    <request name="update_state">
> [...]
> > +      <arg name="serial" type="uint" summary="used to identify the
> known state"/>
> > +      <arg name="flags" type="uint" enum="update_state"/>
> > +    </request>
>
> The name "flags" implies that it takes multiple bit flags, but it
> actually takes a single enum value.  Maybe it is better called "state"
> or "reason"?
>

 Yes reason is better. I will update it.

>
> > +      <description summary="update state">
> > +     Allows to atomically send state updates from client.
> > +
> > +     This request should follow after a batch of state updating requests
> > +     like set_surrounding_text, set_content_type, set_cursor_rectangle
> and
> > +     set_preferred_language.
>
> This sentence indicates that the request is used for some sort of
> synchronization between the client and compositor.  I'm wondering if it
> could perform a roundtrip using wl_callback, instead of generating a
> serial on the client side.  Then the serial could later be obtained from
> the compositor through wl_callback.done.  Would that cause any race
> conditions?
>

Yes indeed great idea. I will replace all client generated serials with
wl_display_sync() and use only compositor side generated serials for
enter/leave/input_method_changed like everywhere else in Wayland.

I will send an updated protocol and updated QtWayland reference
implementation soon.

Thanks very much,
Jan Arne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160326/af0fcd45/attachment.html>


More information about the wayland-devel mailing list