void ewmh_init(void)
{
- ewmh = (xcb_ewmh_connection_t *) malloc(sizeof(xcb_ewmh_connection_t));
- xcb_intern_atom_cookie_t *ewmh_cookies;
- ewmh_cookies = xcb_ewmh_init_atoms(dpy, ewmh);
- xcb_ewmh_init_atoms_replies(ewmh, ewmh_cookies, NULL);
+ ewmh = malloc(sizeof(xcb_ewmh_connection_t));
+ if (xcb_ewmh_init_atoms_replies(ewmh, xcb_ewmh_init_atoms(dpy, ewmh), NULL) == 0)
+ err("Can't initialize EWMH atoms.\n");
}
void ewmh_update_wm_name(void)
for (monitor_t *m = mon_head; m != NULL; m = m->next)
for (desktop_t *d = m->desk_head; d != NULL; d = d->next)
- for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n))
+ for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root))
wins[i++] = n->client->window;
if (i != num_clients)
return;
xcb_ewmh_set_client_list(ewmh, default_screen, num_clients, wins);
+ xcb_ewmh_set_client_list_stacking(ewmh, default_screen, num_clients, wins);
}