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

Peter Harris pharris at opentext.com
Tue Jul 7 13:38:13 PDT 2009


Arnaud Fontaine wrote:
>>>>>> Peter Harris <pharris at opentext.com> writes:
> 
>     >> 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 */

Better.

Note, however, that Atom will return an Atom, not a resource id, and
Value can return anything (typically not a resource id).

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://www.opentext.com/connectivity
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list