[PATCH wayland] protocol: add a note about the version bumps on wl_seat

Jonas Ã…dahl jadahl at gmail.com
Tue Mar 24 17:18:11 PDT 2015


On Wed, Mar 25, 2015 at 09:37:21AM +1000, Peter Hutterer wrote:
> See the explanation by Jonas here:
> http://lists.freedesktop.org/archives/wayland-devel/2015-March/020814.html
> 
> ---
> One thought while writing this: would it make sense to add a
> wl_seat.get_pointer_versioned request to request a specific wl_pointer
> version from the seat? or is that a solution waiting for a problem?

What would the point be of getting a pointer with a different version
than the seat? What if a new seat revision adds some feature that has a
corresponding event/request on wl_pointer? Should it be allowed to get
a partly non-working wl_pointer from that seat? I don't think it would
be worth it.

> 
>  protocol/wayland.xml | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> index 880f90a..22606bb 100644
> --- a/protocol/wayland.xml
> +++ b/protocol/wayland.xml
> @@ -1329,6 +1329,14 @@
>      </request>
>     </interface>
>  
> +  <!-- Note regarding the wl_seat version:
> +       The wl_pointer, wl_touch, wl_keyboard must be identical to the
> +       wl_seat version. Bumping one requires bumping all of them.
> +
> +       Reason: clients cannot specify a version in wl_seat.get_pointer,
> +       wl_seat.get_keyboard or wl_seat.get_touch, the returned object is
> +       always of the same version as the wl_seat.
> +   -->

I think this belongs in a more generic place, i.e. somewhere in
doc/publican/sources/, since this is not a "wl_seat" specific thing but
applies to any object tree where only the global binding decides the
version.


Jonas

>    <interface name="wl_seat" version="4">
>      <description summary="group of input devices">
>        A seat is a group of keyboards, pointer and touch devices. This
> @@ -1402,6 +1410,7 @@
>  
>    </interface>
>  
> +  <!-- for the version see the comment in wl_seat -->
>    <interface name="wl_pointer" version="4">
>      <description summary="pointer input device">
>        The wl_pointer interface represents one or more input devices,
> @@ -1611,6 +1620,7 @@
>  
>    </interface>
>  
> +  <!-- for the version see the comment in wl_seat -->
>    <interface name="wl_keyboard" version="4">
>      <description summary="keyboard input device">
>        The wl_keyboard interface represents one or more keyboards
> @@ -1725,6 +1735,7 @@
>      </event>
>    </interface>
>  
> +  <!-- for the version see the comment in wl_seat -->
>    <interface name="wl_touch" version="3">
>      <description summary="touchscreen input device">
>        The wl_touch interface represents a touchscreen
> -- 
> 2.3.3
> 
> _______________________________________________
> 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