[Xcb] xcb-util: ewmh library

Barton C Massey bart at cs.pdx.edu
Thu May 21 23:20:46 PDT 2009

In message <sa5zld6rqnv.fsf at Orfeo.duckcorp.org> you wrote:
> Hello,
> I  have  almost  finish   writing  xcb-util/ewmh  according  to  version
> 1.4.draft-2,

Sweet!  Thanks much.

>  however I'm seeking for advices about EWMH atoms in the API
> because  contrary  to  ICCCM,  EWMH  atoms are  not  created  on  server
> startup. At the moment, the atoms are given as a parameter:
>  void
>  xcb_ewmh_set_wm_name_checked(xcb_connection_t *c,
>                               xcb_window_t window,
>                               xcb_atom_t utf8_string_atom,
>                               xcb_atom_t atom,
>                               uint32_t name_len,
>                               const char *name)
> This  is  not  really  convenient  because  it makes  the  API  kind  of
> heavy. Julien  suggested to write  a function xcb_ewmh_init_list_atoms()
> which  initialises all the  atoms at  once but  it would  make a  lot of
> requests besides allocating spaces for  atoms which are not needed. What
> do you think? Any other suggestions?

Just remember that latency, not bandwidth, is the important
limiting factor on X.  This suggests that you should create
and cache all the EWMH atoms with a single round-trip at
initialization time.  Note that the cookie magics [1] should
be working for you here; you don't need to force the
InternAtoms reply and cache the result until the first time
you need one of the atoms.



[1] http://www.webcomicsnation.com/poyorick/botg3/series.php?view=archive&chapter=38620

More information about the Xcb mailing list