[Xcb] Working on RandR 1.2 proto

Ian Osgood iano at quirkster.com
Thu Nov 30 11:19:28 PST 2006


On Nov 29, 2006, at 12:14 PM, Jamey Sharp wrote:

> On Wed, Nov 29, 2006 at 11:41:11AM -0800, Ian Osgood wrote:
>> 	<!-- TODO: verify correct use of <list> -->
>> 	<!-- FIXME: can't use list: ModeInfo is variable length due to  
>> name_len -->
>
> Actually, this is just fine in replies. We generate correct code to
> iterate over each variable-length ModeInfo and then find the start of
> the next list. It's only in requests that we don't have an  
> automatic way
> of doing this.

On further inspection, this is how end of the GetScreenResources  
reply  is wired:

[list of ModeInfo]
[chunk of mode name string data, no string separation, total length  
specified in reply structure]

libXrandr copies piecewise the string data to a separate buffer, null  
separating along the way using a name_len field in each ModeInfo, in  
order to attach each name to its ModeInfo.  I don't know whether this  
mechanism is supported by our current XML. In the meantime, I've  
taken out the BYTE list from the ModeInfo <struct> since they are not  
adjacent on the wire.

ListOutputProperies was also broken. I'll be committing shortly.

>
>> 	<!-- BUG: randrproto.h has too little padding -->
>
> That's probably worth mentioning to Keith.

He fixed the padding issues, and I'm reporting a few other  
discrepancies in another email.

Ian


More information about the Xcb mailing list