arguments of wl_registry.bind

me at beroal.in.ua me at beroal.in.ua
Sat Feb 18 11:26:15 UTC 2017


Hello. IMHO, I found a bug in the Wayland protocol description. It 
pertains to arguments of wl_registry.bind. The protocol description

https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml

says that there are the following arguments. {{{
       <arg name="name" type="uint" summary="unique numeric name of the 
object"/>
       <arg name="id" type="new_id" summary="bounded object"/>
}}}

However, the function "wl_registry_bind" in 
"/usr/include/wayland-client-protocol.h" (I guess that the file is 
generated) executes a call {{{
wl_proxy_marshal_constructor_versioned((struct wl_proxy *) wl_registry,
              WL_REGISTRY_BIND, interface, version, name, 
interface->name, version, NULL)
}}}.
So the actual arguments of wl_registry.bind are [name, interface->name, 
version, id].

Indeed, testing with "kwin" revealed that:
- sending [("uint", 5), ("uint", 3)] returns an error "invalid arguments 
for wl_registry at 2.bind",
- sending [("uint", 5), ("string", b'wl_seat'), ("uint", 4), ("uint", 
3)] works as expected,
where 5 is the name of wl_seat which the server communicated before, 3 
is a free client-side object identifier.
So the Wayland protocol description "wayland.xml" is incorrect. Am I right?



More information about the wayland-devel mailing list