[Xcb] Predefined atoms

Rémi Denis-Courmont remi at remlab.net
Fri Oct 30 00:47:15 PDT 2009

On Thu, 29 Oct 2009 15:01:32 -0700, Barton C Massey <bart at cs.pdx.edu>
> There's definitely some things I don't like about the
> current default atom setup in XCB.
> For starters, I'm not sure why the default atoms aren't
> given values in xcb_atom.h; it seems like
>   static const xcb_atom_t PRIMARY = 1;
> would be better than
>   extern const xcb_atom_t PRIMARY;

I wouldn't know, but I guess the rationale was to avoid unused static
warning whenever <xcb_aotm.h> is included. Or does GCC only generate those
for -non-inline- *functions*? Then perhaps, either an enumeration or a set
of #define's would be needed.

> Of course, this might mean that we'd want a header
> auto-generated from these values, and to put the values in
> the XCB protocol description.


> Since the default atom values are (AFAIK)
> part of the protocol description, why are they not in xcb.h
> instead of off in the atom util library?

That's what I was wondering.

Rémi Denis-Courmont

More information about the Xcb mailing list