[Xcb] [PATCH 1/2] flames: update for xcb-util >= 0.3.8

Uli Schlachter psychon at znc.in
Sat Nov 17 06:19:53 PST 2012


Hi,

On 17.11.2012 12:13, William Swanson wrote:
[...]
> @@ -215,13 +215,19 @@ main ()
>    flame_set_flame_zero (f);
>    flame_set_random_flame_base (f);
>  
> -  xcb_atom_t deleteWindowAtom = xcb_atom_get(f->xcb.c, "WM_DELETE_WINDOW");
> -  xcb_atom_t wmprotocolsAtom = xcb_atom_get(f->xcb.c, "WM_PROTOCOLS");
> +  xcb_intern_atom_cookie_t wmprotocolsCookie, deleteWindowCookie;
> +  wmprotocolsCookie = xcb_intern_atom(f->xcb.c, 0, 12, "WM_PROTOCOLS");
> +  deleteWindowCookie = xcb_intern_atom(f->xcb.c, 0, 16, "WM_DELETE_WINDOW");
> +
> +  xcb_atom_t wmprotocolsAtom, deleteWindowAtom;
> +  wmprotocolsAtom = xcb_intern_atom_reply(f->xcb.c, wmprotocolsCookie, NULL)->atom;
> +  deleteWindowAtom = xcb_intern_atom_reply(f->xcb.c, deleteWindowCookie, NULL)->atom;
[...]

Dunno if we should care (how clean is the rest of the code?) but this leaks the
xcb_intern_atom_reply_t. Perhaps it would be best not to have something like
this in the demos.

Anyway, thanks for making the demos work again. They must be broken for quite a
while already...

Uli
-- 
- Buck, when, exactly, did you lose your mind?
- Three months ago. I woke up one morning married to a pineapple.
  An ugly pineapple... But I loved her.


More information about the Xcb mailing list