[Xcb] some questions and remarks

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Thu Sep 29 13:29:56 PDT 2005



Hey,

>
> > 1) For the QueryTree stuff, there is no Next() or End() functions. Is it
> > normal ?
>
> I don't understand. There are XCBWINDOWNext and XCBWINDOWEnd functions,
> which you should be able to use with the XCBWINDOWIter that you get from
> XCBQueryTreeChildrenIter.

I thought that, when there is a *Iter function, an *Next function should
exist. But, in fact, it's not the case. I need to iterate on the children.
So, i've used:

  children = XCBQueryTreeChildren (rep);
  children_end = children + XCBQueryTreeChildrenLength (rep);
  for (; children != children_end; ++children)
    {
      ***
      ***
    }

>
>
> > Also, XDamageReportNonEmpty is
> > not ported in damage.h. I think it's missing
>
> That's entirely possible. Is that function an actual part of the
> protocol, or should it be an XCBAux thing or something?

I'm blind. It is in damage.h

>
> > 3) Is there an equivalent of NextRequest in xcb ?
>
> Yes... uh... (digging around) No. No, there isn't.
>
> What do you need it for? Remember that the cookie returned by every
> request contains the sequence number of that request.
>

don't know. xcompmgr calls that function. I'll need to dig a bit to
understand what it does.

> > 4) In Xlib, XRenderFindVisualFormat returns iknformation for the format,
> > the type and domething named 'direct'. With xcb, to get the format, I
> > iterate on screen, depth, and visual iter variables, then I can get the
> > format Id.
> >  But type and direct can only be retrieved with forminfo, which is
> > completely independant of the above iterations to get the format. Am I
> > missing something ? any ideas ?
>
> I don't entirely understand the question, but I'm pretty sure I've
> written the code you want already. It's in
> cairo/src/cairo-xcb-surface.c, in the functions format_from_visual and
> _format_from_cairo (depending on how you want to select picture
> formats).

I've see what you've done in cairo. It's exactly the same than what I did.

BUT (always a but) it returns ONLY the xid of the XCBRenderPICTFORMAT.

XRenderFindVisualFormat returns this Id and, in addition, 2 integers :
'direct' and 'type'.

I also need these 2 integers. But with XCB, I can only get them with
XCBRenderQueryPictFormatsFormatsIter. But this function does not requires
a XCBVISUALID. So, it seems that, in XCB, these 2 integers are completely
independant of the requested visual Id, whereas in Xlib, they are not.

so, i'm a bit lost.

Vincent


More information about the Xcb mailing list