void property_update_net_wm_icon(client_t *c, xcb_get_property_cookie_t cookie) { cairo_surface_t *surface = ewmh_window_icon_get_reply(cookie); if(!surface) return; client_set_icon(c, surface); cairo_surface_destroy(surface); }
void property_update_net_wm_icon(client_t *c, xcb_get_property_reply_t *reply) { luaA_object_push(globalconf.L, c); if(reply) { if(ewmh_window_icon_from_reply(reply)) client_set_icon(globalconf.L, -2, -1); } else if(ewmh_window_icon_get_reply(ewmh_window_icon_get_unchecked(c->window))) client_set_icon(globalconf.L, -2, -1); /* remove client */ lua_pop(globalconf.L, 1); }