Wayland specification doesn't match code generation

Paul Sbarra sbarra.paul at gmail.com
Wed Sep 3 20:32:02 PDT 2014


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
anticipated.

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
appreciated.

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.

Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140903/aedada12/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-explicitly-specify-all-registry-bind-request-argumen.patch
Type: text/x-patch
Size: 6781 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140903/aedada12/attachment.bin>


More information about the wayland-devel mailing list