[PATCH] wayland: add a release request on wl_seat

Jonas Ådahl jadahl at gmail.com
Thu Oct 1 00:50:35 PDT 2015


On Wed, Sep 30, 2015 at 10:17:49PM +0200, David FORT wrote:
> This is required if we want to correctly remove a wl_seat compositor-side. A
> wl_seat is announced as a global object, then it is bound by the client. When
> the compositor wants to remove the seat, it shall announce the global removal of
> the object. The client can then call the release request on the wl_seat (which
> means I won't use that object anymore). When all clients have released the
> wl_seat, it can be destroyed by the compositor.

Missing Signed-off-by.

The last part of the commit message is not really true. A compositor can
destroy its "seat" long before any client has acknowledged it's gone (and
deal with this fact in the interface implementation), so this is really
just about being able to destroy the wl_resource and nothing else. There
is no need to wait for all clients to do anything really (Sorry I
missed the commit message part in the last patch).

> ---
>  protocol/wayland.xml | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> index 42c9309..6764565 100644
> --- a/protocol/wayland.xml
> +++ b/protocol/wayland.xml
> @@ -1329,7 +1329,7 @@
>      </request>
>     </interface>
>  
> -  <interface name="wl_seat" version="4">
> +  <interface name="wl_seat" version="5">
>      <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
> @@ -1400,6 +1400,15 @@
>        <arg name="name" type="string"/>
>      </event>
>  
> +    <!-- Version 5 additions -->
> +
> +    <request name="release" type="destructor" since="5">
> +      <description summary="release the seat object">
> +      This request is called by the client to inform that it will not use the seat
> +      object.

nit: "The" seat object sounds like there is only one seat object. But
this request is about that the client will stop using *this* seat object.
Less important but IMHO, it would also sound better if it was more clear
that it will not use this seat *anymore*.

With the commit message fixed and the nit above fixed, this is
Reviewed-by: Jonas Ådahl <jadahl at gmail.com>


Jonas

> +      </description>
> +    </request>
> +
>    </interface>
>  
>    <interface name="wl_pointer" version="3">
> -- 
> 1.9.1
> 
> _______________________________________________
> 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