[PATCH wayland v2 1/2] client: update obsolete comments

Marek Chalupa mchqwerty at gmail.com
Wed Dec 10 02:41:27 PST 2014


On 9 December 2014 at 17:08, Pekka Paalanen <ppaalanen at gmail.com> wrote:

> On Wed, 3 Dec 2014 13:05:16 +0100
> Marek Chalupa <mchqwerty at gmail.com> wrote:
>
> > On 28 November 2014 at 14:30, Pekka Paalanen <ppaalanen at gmail.com>
> wrote:
> >
> > > On Fri, 28 Nov 2014 12:18:55 +0100
> > > Marek Chalupa <mchqwerty at gmail.com> wrote:
> > >
> > > > 1) there is nothing like main thread since
> > > >    3c7e8bfbb4745315b7bcbf69fa746c3d6718c305 anymore, so remove
> > > >    it from documentation and update the doc accordingly.
> > > >
> > > > 2) use calling 'default queue' instead of 'main queue'. In the code
> > > >    we use display->default_queue, so it'll be easier the understand.
> > > >
> > > > 3) update some obsolete or unprecise pieces of documentation
> > > >
> > > > Signed-off-by: Marek Chalupa <mchqwerty at gmail.com>
> > > > ---
> > > >  src/wayland-client.c | 80
> > > ++++++++++++++++++++++++++++++++--------------------
> > > >  src/wayland-client.h | 26 ++++++++---------
> > > >  2 files changed, 61 insertions(+), 45 deletions(-)
> > > >
> > > > diff --git a/src/wayland-client.c b/src/wayland-client.c
> > > > index 36380fe..0ab94e9 100644
> > > > --- a/src/wayland-client.c
> > > > +++ b/src/wayland-client.c
>
> ...
>
> > > > +
> > > > + * \note Display queue (for wl_display events like delete_id or so)
> > > > + * is dispatched always.
> > >
> > > I wonder if referring to the display queue is just confusing, because I
> > > don't see us really explaining what it is anywhere. And it's not the
> > > default queue. In fact, I don't think the users of libwayland would
> even
> > > care about it.
> > >
> >
> > True.
> >
> > Hmm, just thinking about it - I should rephrase the thing about checking
> > return value of wl_display_dispatch_queue(). Because when
> > it dispatched some events in display_queue, then it won't return 0 even
> > when it dispatched none of the queue-assigned events, so what I wrote in
> > the comment to wl_display_dispatch_queue() is wrong.
> >
> > But to clarify that it can return non-0 even when it dispatched no
> events,
> > I have to say the thing about display queue, don't I?
>
> Huh. I wonder if that should be fixed in code instead?
> Could anything outside libwayland-client care about when the hidden
> internal display queue dispatches? Errors maybe?
>

Probably nothing external cares about the display queue, so the fix would
lead
to 'clearer' API.


>
> Dispatching the display queue cannot create requests one might need to
> flush, right?
>

Nope atm.


>
> Hmm, but the correction you did to the doc is good, accurate to the
> code AFAIK, and not doing a non-obvious change in the code is probably
> for the better. Yeah, nevermind, I think. :-)
>
>
> Thanks,
> pq
>

You made me thinking if it would be better to fix it in the code... but it
is probably better to not change the API
if it is not necessary (and it seems it is not necessary since nobody has
complained about it yet)

Thanks,
Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20141210/d64ece23/attachment.html>


More information about the wayland-devel mailing list