summary refs log tree commit diff
path: root/group.c
diff options
context:
space:
mode:
authorokan <okan>2016-10-04 15:18:20 +0000
committerokan <okan>2016-10-04 15:18:20 +0000
commit9306c1fbd3e491b9dcdcbb8587460296843a10ce (patch)
treee2851b48a7e80954e8556f5336865763133a794e /group.c
parent8aa5033d12eec5e764885f3e8b27c1df22d6b0df (diff)
downloadcwm-9306c1fbd3e491b9dcdcbb8587460296843a10ce.tar.gz
cwm-9306c1fbd3e491b9dcdcbb8587460296843a10ce.tar.xz
cwm-9306c1fbd3e491b9dcdcbb8587460296843a10ce.zip
Turn CALMWM_NGROUPS define into variable, ngroups.
Diffstat (limited to 'group.c')
-rw-r--r--group.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/group.c b/group.c
index 81961e7..36fd397 100644
--- a/group.c
+++ b/group.c
@@ -154,7 +154,7 @@ group_movetogroup(struct client_ctx *cc, int idx)
 	struct screen_ctx	*sc = cc->sc;
 	struct group_ctx	*gc;
 
-	if (idx < 0 || idx >= CALMWM_NGROUPS)
+	if (idx < 0 || idx >= Conf.ngroups)
 		errx(1, "group_movetogroup: index out of range (%d)", idx);
 
 	TAILQ_FOREACH(gc, &sc->groupq, entry) {
@@ -222,7 +222,7 @@ group_hidetoggle(struct screen_ctx *sc, int idx)
 {
 	struct group_ctx	*gc;
 
-	if (idx < 0 || idx >= CALMWM_NGROUPS)
+	if (idx < 0 || idx >= Conf.ngroups)
 		errx(1, "group_hidetoggle: index out of range (%d)", idx);
 
 	TAILQ_FOREACH(gc, &sc->groupq, entry) {
@@ -245,7 +245,7 @@ group_only(struct screen_ctx *sc, int idx)
 {
 	struct group_ctx	*gc;
 
-	if (idx < 0 || idx >= CALMWM_NGROUPS)
+	if (idx < 0 || idx >= Conf.ngroups)
 		errx(1, "group_only: index out of range (%d)", idx);
 
 	TAILQ_FOREACH(gc, &sc->groupq, entry) {
@@ -335,7 +335,7 @@ group_restore(struct client_ctx *cc)
 		return(0);
 
 	num = (*grpnum == -1) ? 0 : *grpnum;
-	num = MIN(num, (CALMWM_NGROUPS - 1));
+	num = MIN(num, (Conf.ngroups - 1));
 	XFree(grpnum);
 
 	TAILQ_FOREACH(gc, &sc->groupq, entry) {