what are the protocol rules about uniqueness of event and request names?
Sebastian Wick
sebastian.wick at redhat.com
Fri Dec 8 11:54:35 UTC 2023
On Fri, Dec 8, 2023 at 12:44 AM jleivent <jleivent at comcast.net> wrote:
>
> On Thu, 7 Dec 2023 22:06:07 +0000
> David Edmundson <david at davidedmundson.co.uk> wrote:
>
> > The generated C code be full of conflicts. The
> > MY_PROTOCOL_REQUESTEVENT_SINCE_VERSION define for a start.
> >
> > I think it might compile in C, but other generators exist that might
> > not and it's making life much more confusing than it needs to be. I
> > would strongly avoid it.
> >
> > David
>
> To be clear, I wasn't intending it to sound like I wanted to add an
> event and a request with the same name myself. I'm writing some
> middleware that sits between a Wayland compositor and some of its
> clients, and I would like to know if it might encounter an interface
> that has an event and a request with the same name.
>
> I think you've answered that it's not a good idea for a protocol author
> to do that, but it also sounds like it's a possibility that someone
> could do it anyway because there's no direct rule against it. So
> maybe I should take the necessary precautions.
I think a more useful thing to do would be to add this restriction (an
interface cannot have an event and a request with the same name) to
the documentation and to wayland-scanner.
>
> Thanks,
> Jonathan
>
More information about the wayland-devel
mailing list