[PATCH] wayland: add release request on wl_seat

Hardening rdp.effort at gmail.com
Tue Sep 29 01:16:46 PDT 2015


Le 29/09/2015 09:58, Jonas Ådahl a écrit :
> On Tue, Sep 29, 2015 at 09:43:01AM +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 it won't use that object anymore). When all clients have released the
>> wl_seat, it can be destroyed by the compositor.
>> ---
>>  protocol/wayland.xml | 12 +++++++++++-
>>  1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
>> index 42c9309..2c7a675 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">
> 
> Could you bump the other interfaces that will get this version anyway
> as well? As mentioned, they will have this version anyway, when created.

Perhaps I missed something but I have just discussed this with Pekka,
and he told me not to bump the version from wl_pointer and al...

> 
>>      <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,16 @@
>>        <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 address the seat
>> +      object. The compositor can destroy this seat when all clients have called
>> +      this request.
> 
> I don't think we should dictate how the implementation should look like.
> The compositor may have destroyed the seat already, leaving only defunct
> wl_seat objects around.
> 
I didn't mean to dictate the implementation, I'll try to find something
more neutral.


> Not sure what "address" means here. "Use" might be more clear, since we
> use that terminology elsewhere. Also using "this" instead of "the" to
> address the object might be more clear as well.

Ok I will change the description this way.

-- 
David FORT
website: http://www.hardening-consulting.com/



More information about the wayland-devel mailing list