Wayland specification doesn't match code generation
ppaalanen at gmail.com
Thu Sep 4 01:48:52 PDT 2014
On Wed, 3 Sep 2014 22:32:02 -0500
Paul Sbarra <sbarra.paul at gmail.com> wrote:
> I tried to start some discussion on this topic previously, but it
> apparently didn't make it through the moderator, so I'm trying again having
> now joined the list.
> I've recently taken an interest in the gowl
> <https://github.com/sebastianskejoe/gowl> implementation of the wayland
> protocol and noticed that the specification doesn't match the interface
> that gets generated by the wayland scanner.
> If I attempt to code-gen gowl using the wayland.xml file the wl_registry
> bind interface is missing a couple arguments that weston expects, resulting
> in the following runtime error:
> libwayland: message too short, object (2), message bind(usun)
> However, the spec indicates a bind request signature of "un".
> I tracked this down into some curious logic in the scanner and have been
> working on a patch to try and allow the corrected signature to be specified
> in the protocol. Unfortunately this has become more interesting then I'd
> Attached is my naive attempt at resolving this issue. I'm horrified by the
> string->interface lookup and the wl_registry_bind api change but I'm not
> sure what else one can do. Any feedback or additional help would be
> Note that this patch applies to the 1.5.91 tagged commit and compiles
> cleanly (for wayland). Weston didn't like having the lookup function
> defined in multiple files, so maybe there would be a better place to put
> such functionality.
No, you need to fix the generator instead, indeed.
For the record, see:
That happened before Wayland 1.0.
Also somewhat relatedly, the very next commit:
And then the next commit introduces wl_registry which is what we use
More information about the wayland-devel