summary refs log tree commit diff
path: root/group.c
diff options
context:
space:
mode:
Diffstat (limited to 'group.c')
-rw-r--r--group.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/group.c b/group.c
index 73f742d..0601760 100644
--- a/group.c
+++ b/group.c
@@ -143,7 +143,16 @@ group_init(void)
 		TAILQ_INSERT_TAIL(&Groupq, &Groups[i], entry);
 	}
 
-	Group_active = &Groups[0];
+}
+
+void
+group_movetogroup(struct client_ctx *cc, int idx)
+{
+	if (idx < 0 || idx >= CALMWM_NGROUPS)
+		err(1, "group_movetogroup: index out of range (%d)", idx);
+
+	client_hide(cc);
+	_group_add(&Groups[idx], cc);
 }
 
 /*