At 1245869654 time_t, Uli Schlachter wrote:
> +void
> +property_update_wm_protocols(client_t *c)
> +{
> +    xcb_get_wm_protocols_reply_t protocols;
> +
> +    if(xcb_get_wm_protocols_reply(globalconf.connection,
> +                                  
> xcb_get_wm_protocols_unchecked(globalconf.connection,
> +                                                                 c->win, 
> WM_PROTOCOLS),
> +                                  &protocols, NULL))

This is bad, but not your fault. xcb-util lack of from_reply function.
:-(

> +    {
> +        if(c->protocols)
> +            xcb_get_wm_protocols_reply_wipe(c->protocols);
> +        else
> +            c->protocols = p_new(xcb_get_wm_protocols_reply_t, 1);
> +
> +        memcpy(c->protocols, &protocols, sizeof(protocols));

Why do you p_new() ? Can't you just store the struct inside client_t
directly?

Cheers,
-- 
Julien Danjou
// ᐰ <jul...@danjou.info>   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD
// Life is life. Lalalalala.

Attachment: signature.asc
Description: Digital signature

Reply via email to