From b224945446083ec061cea8ae41ee98190f7a4185 Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 23 Aug 2015 17:31:20 +0000 Subject: Move CLIENT_STICKY logic from client hide/unhide to group hide/unhide; rationale being that clients should be able to hide/unhide independently of group switching. --- group.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'group.c') diff --git a/group.c b/group.c index bbcd6cf..c2d4b36 100644 --- a/group.c +++ b/group.c @@ -64,8 +64,10 @@ group_hide(struct group_ctx *gc) screen_updatestackingorder(gc->sc); - TAILQ_FOREACH(cc, &gc->clientq, group_entry) - client_hide(cc); + TAILQ_FOREACH(cc, &gc->clientq, group_entry) { + if (!(cc->flags & CLIENT_STICKY)) + client_hide(cc); + } } void @@ -73,8 +75,10 @@ group_show(struct group_ctx *gc) { struct client_ctx *cc; - TAILQ_FOREACH(cc, &gc->clientq, group_entry) - client_unhide(cc); + TAILQ_FOREACH(cc, &gc->clientq, group_entry) { + if (!(cc->flags & CLIENT_STICKY)) + client_unhide(cc); + } group_restack(gc); group_setactive(gc); -- cgit 1.4.1