Contradiction: according to wayland.xml wl_registry.bind() has no version argument

M. Stoeckl wayl at mstoeckl.com
Sat Oct 31 23:24:57 UTC 2020


> This says wl_registry.bind() has a version argument
> 
> >  
> https://wayland.freedesktop.org/docs/html/ch04.html#sect-Protocol-Versioning
> >  For global objects [...] the actual version of the created
> > protocol  
> object is determined by the *version argument passed to
> wl_registry.bind()*.
> 
> This says it does not have a version argument
> 
> >  
> https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_registry
> > wl_registry::bind - bind an object to the display
> >
> > name
> >    uint - unique numeric name of the object
> > id
> >    new_id - bounded object  
> 
> Which one is correct?

The first is correct; the second is misleading.

A `new_id` field in the XML protocol without a specific interface
specified is implemented in the wire format and by the generated C
code as a (string/uint/object id) triple encoding the name of the
interface, the version, and the id of the object. Most of the time,
XML protocol specifies the interface, and only the object id is used.

Unfortunately, you're not the first to have run into this issue:
https://gitlab.freedesktop.org/wayland/wayland/-/issues/27 . It's been
fixed in the source code, see
https://gitlab.freedesktop.org/wayland/wayland/-/commit/a2f1343b7e7c8f0a548b13a3424b7660a9ec0000
, but the update still needs to be published online.


More information about the wayland-devel mailing list