From 67e11ccf55b1c98c1db978ca29a41a2fdd71e061 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 17 Sep 2014 14:31:37 +0000 Subject: Introduce a check to see if a group holds only 'sticky' clients and use this check to decide if a group is virtually empty. Rationale: if a group contains *only* 'sticky' clients, it should be skipped while cycling through groups. Apply similar logic to the group menu. Based on an idea from phessler@, who also tested another version. --- mousefunc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mousefunc.c') diff --git a/mousefunc.c b/mousefunc.c index c8f7a73..5114d9a 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: mousefunc.c,v 1.80 2014/09/08 21:15:14 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.81 2014/09/17 14:31:37 okan Exp $ */ #include @@ -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->clientq)) + if (group_holds_only_sticky(gc)) continue; menuq_add(&menuq, gc, group_hidden_state(gc) ? "%d: [%s]" : "%d: %s", -- cgit v1.2.3-2-gb3c3