[Xcb] No XIfEvent like function in XCB?
Carsten Meier
cm at trexity.de
Mon Sep 15 03:17:39 PDT 2008
Hello Bart,
for Expose-events it works that way. But after scrolling with
XCopyArea I used to query corresponding GraphicsExpose-events
synchronously with XIfEvent to archieve a behaviour similar to Windows'
ScrollDC function (sorry for that ;) ) which returns the uncovered
region.
I know that it is almost always better to follow the pure async
approach, but in real-world software it is likely that you run into
situations where you have to query the events synchronously or filter
it by type or other criteria. I think there should be some functions to
examine the queue in XCB like in XLib.
Best regards,
Carsten
Am Mon, 15 Sep 2008 01:00:26 -0700
schrieb Barton C Massey <bart at cs.pdx.edu>:
> http://tronche.com/gui/x/xlib/events/exposure/expose.html
> says
>
> "The regions decompose into an (arbitrary) set of
> rectangles, and an Expose event is generated for each
> rectangle. For any given window, the X server guarantees
> to report contiguously all of the regions exposed by some
> action that causes Expose events, such as raising a
> window."
>
> I don't guess I see why it's a problem to just queue the
> received rectangles until you get to count 0 and then
> process them, though? We could put code in xcb/util to do
> that without much trouble, I guess.
>
> Bart
>
> In message <20080913124332.653885fd at before> you wrote:
> > isn't there an XIfEvent like function in XCB? I really need
> > something like this to gather expose-events until its count-field
> > reaches zero. Or is it guaranteed that if you recieve an
> > expose-event with a non-null count-field, the next event in the
> > queue is also an expose-event? If not, this will be a real
> > showstopper for me...
More information about the Xcb
mailing list