[Xcb] missing xcb_setup_roots function ?

Jamey Sharp jamey at minilop.net
Fri Nov 10 01:59:08 PST 2006

On Fri, Nov 10, 2006 at 08:10:57AM +0100, Vincent Torri wrote:
> For example, for the ListProperties reply:
> 1) there's a field (in the reply structure) named atoms_len. For me, it's
> the number of atoms.
> 2) there's 2 functions:
>       xcb_list_properties_atoms_length
> and
>       xcb_list_properties_atoms
> and for me, the first returns the number of *bytes* used by all the atoms,

Are you *sure*? The list length given in the XML description of
ListProperties says xcb_list_properties_atoms_length should return
exactly the same value as reply->atoms_len, unless I'm completely
forgetting how this works.

GetProperty is different though, and might be why you're confused. ...
And in trying to read the XML for that request, now I'm confused. I
think it's different than my m4 version used to be, and I'm not sure how
to read it any more.

Josh, perhaps you can comment on XML-XCB semantics for these requests?

Ian, perhaps you could look at whether we're doing something stupid with
regard to the protocol?

> and the second returns a pointer on the atoms and I can use a memcpy to
> copy in a buffer, like that:
>       memcpy (buf,
>               xcb_list_properties_atoms(r),
>               xcb_list_properties_atoms_length(r));
> and I don't multiply xcb_list_properties_atoms_length(r) by the size of an
> atom.

I *think* your code is wrong and buggy.

> 3) xcb_list_properties_atoms_iterator that returns an iterator and then,
> if iter is that iterator, iter.rem == r->atoms_len

That should be right.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20061110/0094f52e/attachment-0001.pgp

More information about the Xcb mailing list