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

Pekka Paalanen ppaalanen at gmail.com
Fri Mar 27 01:04:49 PDT 2015


On Fri, 27 Mar 2015 15:46:03 +0800
Jonas Ådahl <jadahl at gmail.com> wrote:

> On Fri, Mar 27, 2015 at 09:32:51AM +0200, Pekka Paalanen wrote:
> > On Wed, 25 Mar 2015 08:18:11 +0800
> > Jonas Ådahl <jadahl at gmail.com> wrote:
> > 
> > > 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.
> > 
> > Agreed.
> > 
> > > > 
> > > >  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.
> > 
> > This is not totally correct. Only the version of wl_seat must be the
> > max(wl_pointer, wl_touch, wl_keyboard) version, and when any are
> > bumped, the bumped to versio must be wl_seat version + 1.
> 
> My point was that it is less confusing by having the version in the XML
> be the same version that would normally be created, even though no new
> requests or events were added to that particular interface. Now in
> various places it says <interface name="foo" version="3"> ...
> </interface> but one would often create a foo object with version 4 if
> its parent was created with that version, which is a bit confusing,
> since it looks like the version one created was higher than the newest
> in the protocol spec.

Hmm, that does make sense. We get away with the current practice
because no version checks are done on object creation where they inherit
their version. Only thing we check at runtime for everything is a
method's "since" vs. the object's version.


Thanks,
pq


More information about the wayland-devel mailing list