[Xcb] [RFC] Add majorCode, minorCode and resourceID to X generic error

Arnaud Fontaine arnaud at andesi.org
Tue Jul 7 13:30:04 PDT 2009


>>>>> Peter Harris <pharris at opentext.com> writes:

Hi,

    >> However,  xcb_generic_error_t does  not contain such  fields, and
    >> instead  rely on XCB_EVENT_REQUEST_TYPE in  xcb-util/event to get
    >> the  majorCode for example.  I  have attached a  patch which adds
    >> these fields. What do you think about this patch?

    > Looks  fine to  me. Not  every error includes  a resource  id, but
    >  "resource_id" is  as good  a name  for that  particular  piece of
    > padding as any I can think  of. Perhaps a comment such as /**< Not
    > always resource id */ ?

If  I  properly understand  the  X Protocol,  the  resource  id is  only
meaningful  for requests  which  have side-effects.   Therefore, it  may
return  one of the  following resource  id: Colormap,  Cursor, Drawable,
Font, GContext, IDChoice,  Pixmap, Window, Atom or Value.   I have added
the following comment to my patch:

/** < Resource ID for requests with side effects only */

    >> I'm  also wondering what  is the purpose of  full_sequence field?
    >> (just curious ;)).

    > It's  an extended  sequence number for  apps that don't  check for
    > errors at least once every 65535 requests.

Oh ok, I see.

Thanks much for your review and explanations.

Cheers,
Arnaud


More information about the Xcb mailing list