diff options
author | Jan Arne Petersen <jpetersen@openismus.com> | 2013-04-18 16:47:33 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-05-02 16:41:48 -0400 |
commit | 00191c7c4a3bb049db95ca1fe612f0ba993cbaf7 (patch) | |
tree | 402342701de907433590dd6c426e84c77f6ec674 /protocol | |
parent | b41531a88ea79376560f11e3ec488cfa8b9e3ef3 (diff) |
text: Fix serial handling
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'protocol')
-rw-r--r-- | protocol/input-method.xml | 17 | ||||
-rw-r--r-- | protocol/text.xml | 26 |
2 files changed, 24 insertions, 19 deletions
diff --git a/protocol/input-method.xml b/protocol/input-method.xml index d9ae4a92..dd905c2d 100644 --- a/protocol/input-method.xml +++ b/protocol/input-method.xml @@ -33,6 +33,13 @@ receive information about the text model from the application via events. Input method contexts do not keep state after deactivation and should be destroyed after deactivation is handled. + + Serials are used to synchronize the state between the text input and + an input method. New serials are sent by the text input in the + commit_state request and are used by the input method to indicate + the known text input state in events like preedit_string, commit_string, + and keysym. The text input can then ignore events from the input method + which are based on an outdated state (for example after a reset). </description> <request name="destroy" type="destructor"/> <request name="commit_string"> @@ -63,7 +70,6 @@ This request should be sent before sending preedit_string request. </description> - <arg name="serial" type="uint"/> <arg name="index" type="uint"/> <arg name="length" type="uint"/> <arg name="style" type="uint"/> @@ -75,16 +81,13 @@ This request should be sent before sending preedit_string request. </description> - <arg name="serial" type="uint"/> <arg name="index" type="int"/> </request> <request name="delete_surrounding_text"> - <arg name="serial" type="uint"/> <arg name="index" type="int"/> <arg name="length" type="uint"/> </request> <request name="cursor_position"> - <arg name="serial" type="uint"/> <arg name="index" type="int"/> <arg name="anchor" type="int"/> </request> @@ -147,7 +150,6 @@ <arg name="anchor" type="uint"/> </event> <event name="reset"> - <arg name="serial" type="uint"/> </event> <event name="content_type"> <arg name="hint" type="uint"/> @@ -157,7 +159,9 @@ <arg name="button" type="uint"/> <arg name="index" type="uint"/> </event> - <event name="commit"/> + <event name="commit_state"> + <arg name="serial" type="uint"/> + </event> <event name="preferred_language"> <arg name="language" type="string"/> </event> @@ -176,7 +180,6 @@ which allows communication with the text model. </description> <arg name="id" type="new_id" interface="input_method_context"/> - <arg name="serial" type="uint"/> </event> <event name="deactivate"> <description summary="activate event"> diff --git a/protocol/text.xml b/protocol/text.xml index 02c50410..58a6ab53 100644 --- a/protocol/text.xml +++ b/protocol/text.xml @@ -2,7 +2,7 @@ <protocol name="text"> <copyright> - Copyright © 2012 Intel Corporation + Copyright © 2012, 2013 Intel Corporation Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -38,6 +38,13 @@ the pre-edit and commit events. Using this interface removes the need for applications to directly process hardware key events and compose text out of them. + + Serials are used to synchronize the state between the text input and + an input method. New serials are sent by the text input in the + commit_state request and are used by the input method to indicate + the known text input state in events like preedit_string, commit_string, + and keysym. The text input can then ignore events from the input method + which are based on an outdated state (for example after a reset). </description> <request name="activate"> <description summary="request activation"> @@ -48,7 +55,6 @@ text-input object and tracked for focus lost. The enter event is emitted on successful activation. </description> - <arg name="serial" type="uint"/> <arg name="seat" type="object" interface="wl_seat"/> <arg name="surface" type="object" interface="wl_surface"/> </request> @@ -76,7 +82,6 @@ reset, for example after the text was changed outside of the normal input method flow. </description> - <arg name="serial" type="uint"/> </request> <request name="set_surrounding_text"> <description summary="sets the surrounding text"> @@ -162,6 +167,7 @@ <arg name="language" type="string"/> </request> <request name="commit_state"> + <arg name="serial" type="uint" summary="used to identify the known state"/> </request> <request name="invoke_action"> <arg name="button" type="uint"/> @@ -204,7 +210,7 @@ The commit text can be used to replace the preedit text on reset (for example on unfocus). </description> - <arg name="serial" type="uint"/> + <arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="text" type="string"/> <arg name="commit" type="string"/> </event> @@ -228,7 +234,6 @@ This event should be handled as part of a following preedit_string event. </description> - <arg name="serial" type="uint"/> <arg name="index" type="uint"/> <arg name="length" type="uint"/> <arg name="style" type="uint"/> @@ -241,7 +246,6 @@ This event should be handled as part of a following preedit_string event. </description> - <arg name="serial" type="uint"/> <arg name="index" type="int"/> </event> <event name="commit_string"> @@ -253,7 +257,7 @@ Any previously set composing text should be removed. </description> - <arg name="serial" type="uint"/> + <arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="text" type="string"/> </event> <event name="cursor_position"> @@ -261,7 +265,6 @@ Notify when the cursor or anchor position should be modified. It should take effect after the next commit_string event. </description> - <arg name="serial" type="uint"/> <arg name="index" type="int"/> <arg name="anchor" type="int"/> </event> @@ -271,7 +274,6 @@ deleted. Index is relative to the current cursor (as byte index). Length is the length of deleted text (in bytes). </description> - <arg name="serial" type="uint"/> <arg name="index" type="int"/> <arg name="length" type="uint"/> </event> @@ -284,7 +286,7 @@ wl_keyboard key_state. Modifiers are a mask for effective modifiers (where the modifier indices are set by the modifiers_map event) </description> - <arg name="serial" type="uint"/> + <arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="time" type="uint"/> <arg name="sym" type="uint"/> <arg name="state" type="uint"/> @@ -295,7 +297,7 @@ Sets the language of the input text. The "language" argument is a RFC-3066 format language tag. </description> - <arg name="serial" type="uint"/> + <arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="language" type="string"/> </event> <enum name="text_direction"> @@ -311,7 +313,7 @@ editor when there is no input yet done and making sure neutral direction text is laid out properly. </description> - <arg name="serial" type="uint"/> + <arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="direction" type="uint"/> </event> </interface> |