summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2014-09-17 14:31:37 +0000
committerokan <okan>2014-09-17 14:31:37 +0000
commit74f4a1bad98bdb25212b32d15fa411d2ed16b6df (patch)
tree420b1d92baeb31357dfa062a904282bc439e7084 /mousefunc.c
parent4b6dc963983906e9a2866565da003840037dff23 (diff)
downloadcwm-74f4a1bad98bdb25212b32d15fa411d2ed16b6df.tar.gz
cwm-74f4a1bad98bdb25212b32d15fa411d2ed16b6df.tar.xz
cwm-74f4a1bad98bdb25212b32d15fa411d2ed16b6df.zip
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.
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 2d3909e..6b35029 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->clientq))
+		if (group_holds_only_sticky(gc))
 			continue;
 		menuq_add(&menuq, gc,
 		    group_hidden_state(gc) ? "%d: [%s]" : "%d: %s",