[Xcb] xcb pre-release

Barton C Massey bart at cs.pdx.edu
Thu Jul 17 17:16:50 PDT 2008


In message <87hcap2gpq.fsf at ambire.localdomain> you wrote:
> () Peter Hutterer <peter.hutterer at who-t.net>
> () Thu, 17 Jul 2008 14:46:33 +0930
> 
>    Is xcb proto ready for a 1.2 release?
> 
> A bugfix (patch below) still needs to be applied, AFAICT.
> The tip of the discussion regarding it can be found at:
> http://lists.freedesktop.org/archives/xcb/2008-July/003592.html

Actually, Thien-Thi, I don't think the suggested patch can
be made right.  This should be an FAQ somewhere on the
currently-broken XCB wiki.

The basic problem is that we provide no way of easily
constructing, on the user side, a packed list of strings of
known size and count to use in requests.  However, part of
the philosophy of XCB is that it won't repack data for the
application: the app is expected to pass parameters in a
format ready to put on the wire.  This is a feature for
performance-concerned apps that keep the data lying around
in the proper format, but it's not so much a feature for
figuring out what's going on.

Thus, in a few cases such as SetFontPath, we currently just
punt and ask for a char* and a length.  This is clearly a
bug, but we haven't heard a better suggestion.  Probably the
best we can do is just provide the function everybody wants
in util/aux.  Better suggestions are gratefully accepted.

I've put optional test cases for GetFontPath and SetFontPath
into demo/xcb-test now.  I'll commit them as soon as I get
my commit access back. :-)

Having not heard from Jamey or Josh for several days on
this, I'd personally say, Peter, that I'd love to have you
roll a maintenance release of both xproto and libxcb.  It
may only last a month or two, but that's OK by me.

	Bart

> From e3cf8896c28f10465db24539a4d8cf7e92b80dbb Mon Sep 17 00:00:00 2001
> From: Thien-Thi Nguyen <ttn at gnuvola.org>
> Date: Sat, 14 Jun 2008 10:44:13 +0200
> Subject: [PATCH] Bugfix: Use LISTofSTRING8 for `SetFontPath' request.
> 
> * src/xproto.xml (SetFontPath): Rename field `font_qty'
> to `path_len'; add padding; change list field `path' to
> type `STR', with fieldref `path_len'.
> 
> Signed-off-by: Thien-Thi Nguyen <ttn at gnuvola.org>
> ---
>  src/xproto.xml |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/xproto.xml b/src/xproto.xml
> index 0b796a9..ceec302 100644
> --- a/src/xproto.xml
> +++ b/src/xproto.xml
> @@ -1339,8 +1339,11 @@ authorization from the authors.
>  
>    <request name="SetFontPath" opcode="51">
>      <pad bytes="1" />
> -    <field type="CARD16" name="font_qty" />
> -    <list type="char" name="path" />
> +    <field type="CARD16" name="path_len" />
> +    <pad bytes="2" />
> +    <list type="STR" name="path">
> +      <fieldref>path_len</fieldref>
> +    </list>
>    </request>
>  
>    <request name="GetFontPath" opcode="52">
> -- 
> 1.5.3.5


More information about the Xcb mailing list