diff --git a/calmwm.h b/calmwm.h index 243be98..252ba3d 100644 --- a/calmwm.h +++ b/calmwm.h @@ -202,7 +202,7 @@ TAILQ_HEAD(client_ctx_q, client_ctx); struct group_ctx { TAILQ_ENTRY(group_ctx) entry; struct screen_ctx *sc; - struct client_ctx_q clients; + struct client_ctx_q clientq; char *name; int num; }; diff --git a/client.c b/client.c index 2a6a83e..0b10053 100644 --- a/client.c +++ b/client.c @@ -154,7 +154,7 @@ client_delete(struct client_ctx *cc) xu_ewmh_net_client_list(sc); if (cc->group != NULL) - TAILQ_REMOVE(&cc->group->clients, cc, group_entry); + TAILQ_REMOVE(&cc->group->clientq, cc, group_entry); if (cc == client_current()) client_none(sc); @@ -943,7 +943,7 @@ client_htile(struct client_ctx *cc) return; i = n = 0; - TAILQ_FOREACH(ci, &gc->clients, group_entry) { + TAILQ_FOREACH(ci, &gc->clientq, group_entry) { if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc)) continue; @@ -971,7 +971,7 @@ client_htile(struct client_ctx *cc) x = xine.x; w = xine.w / n; h = xine.h - mh; - TAILQ_FOREACH(ci, &gc->clients, group_entry) { + TAILQ_FOREACH(ci, &gc->clientq, group_entry) { if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc)) continue; @@ -1002,7 +1002,7 @@ client_vtile(struct client_ctx *cc) return; i = n = 0; - TAILQ_FOREACH(ci, &gc->clients, group_entry) { + TAILQ_FOREACH(ci, &gc->clientq, group_entry) { if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc)) continue; @@ -1030,7 +1030,7 @@ client_vtile(struct client_ctx *cc) y = xine.y; h = xine.h / n; w = xine.w - mw; - TAILQ_FOREACH(ci, &gc->clients, group_entry) { + TAILQ_FOREACH(ci, &gc->clientq, group_entry) { if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc)) continue; diff --git a/group.c b/group.c index 9f1ad62..bc8c300 100644 --- a/group.c +++ b/group.c @@ -45,12 +45,12 @@ static void group_assign(struct group_ctx *gc, struct client_ctx *cc) { if (cc->group != NULL) - TAILQ_REMOVE(&cc->group->clients, cc, group_entry); + TAILQ_REMOVE(&cc->group->clientq, cc, group_entry); cc->group = gc; if (cc->group != NULL) - TAILQ_INSERT_TAIL(&gc->clients, cc, group_entry); + TAILQ_INSERT_TAIL(&gc->clientq, cc, group_entry); xu_ewmh_net_wm_desktop(cc); } @@ -62,7 +62,7 @@ group_hide(struct group_ctx *gc) screen_updatestackingorder(gc->sc); - TAILQ_FOREACH(cc, &gc->clients, group_entry) + TAILQ_FOREACH(cc, &gc->clientq, group_entry) client_hide(cc); } @@ -71,7 +71,7 @@ group_show(struct group_ctx *gc) { struct client_ctx *cc; - TAILQ_FOREACH(cc, &gc->clients, group_entry) + TAILQ_FOREACH(cc, &gc->clientq, group_entry) client_unhide(cc); group_restack(gc); @@ -86,14 +86,14 @@ group_restack(struct group_ctx *gc) int i, lastempty = -1; int nwins = 0, highstack = 0; - TAILQ_FOREACH(cc, &gc->clients, group_entry) { + TAILQ_FOREACH(cc, &gc->clientq, group_entry) { if (cc->stackingorder > highstack) highstack = cc->stackingorder; } winlist = xcalloc((highstack + 1), sizeof(*winlist)); /* Invert the stacking order for XRestackWindows(). */ - TAILQ_FOREACH(cc, &gc->clients, group_entry) { + TAILQ_FOREACH(cc, &gc->clientq, group_entry) { winlist[highstack - cc->stackingorder] = cc->win; nwins++; } @@ -125,7 +125,7 @@ group_init(struct screen_ctx *sc) for (i = 0; i < CALMWM_NGROUPS; i++) { gc = xcalloc(1, sizeof(*gc)); gc->sc = sc; - TAILQ_INIT(&gc->clients); + TAILQ_INIT(&gc->clientq); gc->name = xstrdup(num_to_name[i]); gc->num = i; TAILQ_INSERT_TAIL(&sc->groupq, gc, entry); @@ -211,7 +211,7 @@ group_hidden_state(struct group_ctx *gc) struct client_ctx *cc; int hidden = 0, same = 0; - TAILQ_FOREACH(cc, &gc->clients, group_entry) { + TAILQ_FOREACH(cc, &gc->clientq, group_entry) { if (cc->flags & CLIENT_STICKY) continue; if (hidden == ((cc->flags & CLIENT_HIDDEN) ? 1 : 0)) @@ -242,7 +242,7 @@ group_hidetoggle(struct screen_ctx *sc, int idx) else { group_hide(gc); /* make clients stick to empty group */ - if (TAILQ_EMPTY(&gc->clients)) + if (TAILQ_EMPTY(&gc->clientq)) group_setactive(sc, idx); } } @@ -283,7 +283,7 @@ group_cycle(struct screen_ctx *sc, int flags) if (gc == sc->group_active) break; - if (!TAILQ_EMPTY(&gc->clients) && showgroup == NULL) + if (!TAILQ_EMPTY(&gc->clientq) && showgroup == NULL) showgroup = gc; else if (!group_hidden_state(gc)) group_hide(gc); diff --git a/mousefunc.c b/mousefunc.c index b46fcfc..2d3909e 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -188,7 +188,7 @@ mousefunc_menu_group(struct client_ctx *cc, union arg *arg) TAILQ_INIT(&menuq); TAILQ_FOREACH(gc, &sc->groupq, entry) { - if (TAILQ_EMPTY(&gc->clients)) + if (TAILQ_EMPTY(&gc->clientq)) continue; menuq_add(&menuq, gc, group_hidden_state(gc) ? "%d: [%s]" : "%d: %s",