summary refs log tree commit diff
path: root/group.c
diff options
context:
space:
mode:
authorokan <okan>2014-09-01 18:04:58 +0000
committerokan <okan>2014-09-01 18:04:58 +0000
commitbecc7f260c1230def154a98b8f80829d466aa18c (patch)
tree58a1e36360065a0c37a7bb58e9de3285868df573 /group.c
parent3b99d5357667095b3b89e2c41c2cb17d07537b42 (diff)
downloadcwm-becc7f260c1230def154a98b8f80829d466aa18c.tar.gz
cwm-becc7f260c1230def154a98b8f80829d466aa18c.tar.xz
cwm-becc7f260c1230def154a98b8f80829d466aa18c.zip
Merge group_menu into mousefunc_menu_group.
Diffstat (limited to 'group.c')
-rw-r--r--group.c39
1 files changed, 3 insertions, 36 deletions
diff --git a/group.c b/group.c
index e4567ee..7d08f34 100644
--- a/group.c
+++ b/group.c
@@ -33,10 +33,7 @@
 #include "calmwm.h"
 
 static void		 group_assign(struct group_ctx *, struct client_ctx *);
-static void		 group_hide(struct screen_ctx *, struct group_ctx *);
-static void		 group_show(struct screen_ctx *, struct group_ctx *);
 static void		 group_restack(struct screen_ctx *, struct group_ctx *);
-static int		 group_hidden_state(struct group_ctx *);
 static void		 group_setactive(struct screen_ctx *, long);
 
 const char *num_to_name[] = {
@@ -58,7 +55,7 @@ group_assign(struct group_ctx *gc, struct client_ctx *cc)
 	xu_ewmh_net_wm_desktop(cc);
 }
 
-static void
+void
 group_hide(struct screen_ctx *sc, struct group_ctx *gc)
 {
 	struct client_ctx	*cc;
@@ -69,7 +66,7 @@ group_hide(struct screen_ctx *sc, struct group_ctx *gc)
 		client_hide(cc);
 }
 
-static void
+void
 group_show(struct screen_ctx *sc, struct group_ctx *gc)
 {
 	struct client_ctx	*cc;
@@ -199,7 +196,7 @@ group_sticky_toggle_exit(struct client_ctx *cc)
 /*
  * If all clients in a group are hidden, then the group state is hidden.
  */
-static int
+int
 group_hidden_state(struct group_ctx *gc)
 {
 	struct client_ctx	*cc;
@@ -292,36 +289,6 @@ group_cycle(struct screen_ctx *sc, int flags)
 }
 
 void
-group_menu(struct screen_ctx *sc)
-{
-	struct group_ctx	*gc;
-	struct menu		*mi;
-	struct menu_q		 menuq;
-
-	TAILQ_INIT(&menuq);
-
-	TAILQ_FOREACH(gc, &sc->groupq, entry) {
-		if (TAILQ_EMPTY(&gc->clients))
-			continue;
-		menuq_add(&menuq, gc,
-		    group_hidden_state(gc) ? "%d: [%s]" : "%d: %s",
-		    gc->num, sc->group_names[gc->num]);
-	}
-
-	if (TAILQ_EMPTY(&menuq))
-		return;
-
-	mi = menu_filter(sc, &menuq, NULL, NULL, 0, NULL, NULL);
-	if (mi != NULL && mi->ctx != NULL) {
-		gc = (struct group_ctx *)mi->ctx;
-		(group_hidden_state(gc)) ?
-		    group_show(sc, gc) : group_hide(sc, gc);
-	}
-
-	menuq_clear(&menuq);
-}
-
-void
 group_alltoggle(struct screen_ctx *sc)
 {
 	struct group_ctx	*gc;