[PATCH 1/3] fixesproto: Add a query to get the screen layout.

Keith Packard keithp at keithp.com
Tue Jul 28 23:07:11 PDT 2009


On Tue, 2009-07-28 at 22:44 -0700, Aaron Plattner wrote:

> I.e. it simplifies the code by telling the compiler that you expect an
> unspecified number of xXFixesScreenLayoutRec structures immediately after
> the entires in the reply structure itself.  However, Keith claims it isn't
> portable C, so I'm going to have to rewrite it the ugly way anyway.

You don't get to return the reply to applications anyway, so you're only
making the Xlib code a bit simpler -- not a huge deal. And, yeah, GCC is
a nicer language than C, but we don't get to use that :-)


> I was hoping to avoid having to define two separate structures, one for the
> protocol and one for the libXfixes client, and then having to write dumb
> code that does this:
> 
>   layout[i].x            = replyLayout[i].x;
>   layout[i].y            = replyLayout[i].y;
>   layout[i].positionType = replyLayout[i].positionType;
>   layout[i].refScreen    = replyLayout[i].refScreen;
> 
> just because there are two separate structure definitions that just happen
> to be the same.

Not the same, just with the same members (but with different types; Xlib
doesn't have CARD32 or CARD16).

Enjoy typing; Xlib encourages that :-)

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.x.org/archives/xorg-devel/attachments/20090728/47bdaeea/attachment.pgp 


More information about the xorg-devel mailing list