From 39f6f479f6e5636dd0498d419a2172b9683f75ce Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 7 Mar 2019 13:14:41 +0000 Subject: gc clientq inside groups, instead use the better maintained one per-screen --- client.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index e86ded2..ef4a766 100644 --- a/client.c +++ b/client.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: client.c,v 1.252 2019/02/28 13:11:53 okan Exp $ + * $OpenBSD: client.c,v 1.253 2019/03/07 13:14:41 okan Exp $ */ #include @@ -183,9 +183,6 @@ client_remove(struct client_ctx *cc) if (cc->flags & CLIENT_ACTIVE) xu_ewmh_net_active_window(sc, None); - if (cc->gc != NULL) - TAILQ_REMOVE(&cc->gc->clientq, cc, group_entry); - while ((wn = TAILQ_FIRST(&cc->nameq)) != NULL) { TAILQ_REMOVE(&cc->nameq, wn, entry); free(wn->name); @@ -976,7 +973,9 @@ client_htile(struct client_ctx *cc) cc->geom.x + cc->geom.w / 2, cc->geom.y + cc->geom.h / 2, CWM_GAP); - TAILQ_FOREACH(ci, &gc->clientq, group_entry) { + TAILQ_FOREACH(ci, &sc->clientq, entry) { + if (ci->gc != cc->gc) + continue; if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc) || ci->geom.x < area.x || @@ -1005,7 +1004,9 @@ client_htile(struct client_ctx *cc) x = area.x; w = area.w / n; h = area.h - mh; - TAILQ_FOREACH(ci, &gc->clientq, group_entry) { + TAILQ_FOREACH(ci, &sc->clientq, entry) { + if (ci->gc != cc->gc) + continue; if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc) || ci->geom.x < area.x || @@ -1044,7 +1045,9 @@ client_vtile(struct client_ctx *cc) cc->geom.x + cc->geom.w / 2, cc->geom.y + cc->geom.h / 2, CWM_GAP); - TAILQ_FOREACH(ci, &gc->clientq, group_entry) { + TAILQ_FOREACH(ci, &sc->clientq, entry) { + if (ci->gc != cc->gc) + continue; if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc) || ci->geom.x < area.x || @@ -1073,7 +1076,9 @@ client_vtile(struct client_ctx *cc) y = area.y; h = area.h / n; w = area.w - mw; - TAILQ_FOREACH(ci, &gc->clientq, group_entry) { + TAILQ_FOREACH(ci, &sc->clientq, entry) { + if (ci->gc != cc->gc) + continue; if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc) || ci->geom.x < area.x || -- cgit v1.2.3-2-gb3c3