[RFC wayland] Add server-side dispatchers support

Jason Ekstrand jason at jlekstrand.net
Tue Mar 26 07:03:57 PDT 2013


On Tue, Mar 26, 2013 at 8:24 AM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On Mar 26, 2013 3:28 AM, "Dave Airlie" <airlied at gmail.com> wrote:
>>
>> > +++ b/src/wayland-private.h
>> > @@ -74,15 +74,9 @@ int wl_connection_write(struct wl_connection
>> > *connection, const void *data, size
>> >  int wl_connection_queue(struct wl_connection *connection,
>> >                         const void *data, size_t count);
>> >
>> > -union wl_argument {
>> > -       int32_t i;
>> > -       uint32_t u;
>> > -       wl_fixed_t f;
>> > -       const char *s;
>> > -       struct wl_object *o;
>> > -       uint32_t n;
>> > -       struct wl_array *a;
>> > -       int32_t h;
>> > +struct wl_dispatcher {
>>
>> Care to document why n is different from u and h from i?
>>
>> at first glance I can't see what they are for.
>
> David,
> Thanks for pointing this out as it should probably be documented.  Those are
> the standard abbreviations for the 8 Wayland data types. Specifically, "n"
> stands for new_id, "h" stands for file descriptor. While not strictly
> needed, the redundancy serves to make things more explicit in the code. When
> I actually send out the patches, I'll put comments in the union to that
> effect.
>
> Thanks for reviewing,
> --Jason Ekstrand

One other thing I should mention to potential reviewers.  The purpose
of this patch is to add dispatchers support to libwayland without
breaking API.  Most of what I'm looking for in review is whether this
is too hackish and if there's a better way to do it.  If it look ok, I
will send out a formal patch series later with whatever comments taken
into account.
--Jason Ekstrand


More information about the wayland-devel mailing list