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 [email protected]", - 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?

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to