summaryrefslogtreecommitdiff
path: root/app/cwm/mousefunc.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2014-09-17 14:31:38 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2014-09-17 14:31:38 +0000
commit967609a0e697cd271b581a74924634d9afc7a8f3 (patch)
tree54fb661d9c11f45bbe8010b974843d48b2976942 /app/cwm/mousefunc.c
parente2421c8bb2147c963d931b9a8e24331e70986e08 (diff)
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 'app/cwm/mousefunc.c')
-rw-r--r--app/cwm/mousefunc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c
index c8f7a7302..5114d9aa4 100644
--- a/app/cwm/mousefunc.c
+++ b/app/cwm/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 <sys/param.h>
@@ -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",