[Xcb] Predefined atoms
Barton C Massey
bart at cs.pdx.edu
Thu Oct 29 15:01:32 PDT 2009
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;
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.
I thought we'd killed all the m4, but I just realized that
util/atom still is written in it. :-) It would be nice to
have it all rewritten to use the XML and Python bits
instead. It would also be nice to get rid of the gperf
dependency, but this is less crucial and there's at least a
rationale for it.
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?
Finally, I note that these default atom names are not
prefixed in any way. Given that they include a lot of
generic stuff like PRIMARY, this seems like pretty severe
namespace pollution. XCB_PRIMARY anyone?
All of that said, if you're working with atoms in XCB you
probably want util/xcb_atom for the rest of what it does
More information about the Xcb