[PATCH wayland] protocol: add repeat_info event to wl_keyboard

Giulio Camuffo giuliocamuffo at gmail.com
Tue Jul 22 05:45:38 PDT 2014


2014-07-17 0:04 GMT+03:00 Jonny Lamb <jonny.lamb at collabora.co.uk>:
> In the process wl_keyboard's version has been incremented. Given
> clients get the wl_keyboard from wl_seat without a version, wl_seat's
> version has also been incremented (wl_seat version 4 implies
> wl_keyboard version 4).
> ---
>  protocol/wayland.xml | 28 ++++++++++++++++++++++++++--
>  1 file changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> index 4e65b32..5c90a19 100644
> --- a/protocol/wayland.xml
> +++ b/protocol/wayland.xml
> @@ -1277,7 +1277,7 @@
>      </request>
>     </interface>
>
> -  <interface name="wl_seat" version="3">
> +  <interface name="wl_seat" version="4">
>      <description summary="group of input devices">
>        A seat is a group of keyboards, pointer and touch devices. This
>        object is published as a global during start up, or when such a
> @@ -1505,7 +1505,7 @@
>
>    </interface>
>
> -  <interface name="wl_keyboard" version="3">
> +  <interface name="wl_keyboard" version="4">
>      <description summary="keyboard input device">
>        The wl_keyboard interface represents one or more keyboards
>        associated with a seat.
> @@ -1593,6 +1593,30 @@
>      <request name="release" type="destructor" since="3">
>        <description summary="release the keyboard object"/>
>      </request>
> +
> +    <!-- Version 4 of additions -->
Nitpick: i'd remove that "of".

> +
> +    <event name="repeat_info" since="4">
> +      <description summary="repeat rate and delay">
> +        Informs the client about the keyboard's repeat rate and delay.
> +
> +        This event guaranteed to be sent as soon as the wl_keyboard object has
> +        been created, so after the wl_keyboard is created, one roundtrip will
> +        be sufficient in receiving this event.
While this is true, I'd prefer if it said that when receiving a key
event the repeat_info event was received already for sure. I wouldn't
like this wording to encourage clients developers to use a roundtrip
when it is not really necessary.

> +
> +        Negative values for either rate or delay are illegal. A rate of zero
> +        will disable any repeating (regardless of the value of delay).
> +
> +        This event can be sent later on as well with a new value if necessary,
> +        so clients should continue listening for the event past the creation
> +        of wl_keyboard.
> +      </description>
> +
> +      <arg name="rate" type="int"
> +           summary="the rate of repeating keys in characters per second"/>
> +      <arg name="delay" type="int"
> +           summary="delay in milliseconds since key down until repeating starts"/>
> +    </event>
>    </interface>
>
>    <interface name="wl_touch" version="3">
> --
> 2.0.0
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel

--
Giulio


More information about the wayland-devel mailing list