[Xcb] Re: XPending - XCBEventQueueLength sounds right but its gone. What else?

Barton C Massey bart at cs.pdx.edu
Mon Jul 18 01:01:58 EST 2005


I guess the question we always have is "why"?  Why do you
want to count the number of queued events, rather than just
dequeueing them as needed?  If there's some value in knowing
this count, we'd be willing to put some work into being able
to tell you, but we haven't yet seen a place where it was
useful information...

	Bart

In message <e3b7bac0507170024198be17a at mail.gmail.com> you wrote:
> On 7/16/05, Vincent Torri <Vincent.Torri at iecn.u-nancy.fr> wrote:
> > 
> > You can do that:
> > 
> > XCBGenericEvent *ev;
> > 
> > while ((ev = XCBPollForEvent(conn, 0)))
> >   {
> >     /* manage your event here */
> >   }
> 
> The problem is, I don't want to process them all.   I just want to
> know how many there are.  I guess I could just dequeue them all, count
> how many were dequeued, and enqueue them again.  I really hope that it
> doesn't come to that.
> 
> > don't forget to free your event.
> > 
> > For ecore, i needed to change a bit the algo to take into account that a
> > XPending-like function does not exist. Maybe it will be your case too :)
> 
> I saw that conversation that you and Jamey had about XPending where he
> suggested a loop like the one above, but it doesn't help me since I'm
> trying to solve a different problem.
> 
> -- 
> 
> Regards,
> 
> Travis Spencer
> _______________________________________________
> xcb mailing list
> xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the xcb mailing list