summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2011-09-19 07:23:03 +0000
committerokan <okan>2011-09-19 07:23:03 +0000
commit54c1b90725ffd4ae82eba410ce172466fea3dadc (patch)
tree5cab367ed81488f9d3ea3ee33a9d01f05dc667ba
parent3c67ec8ccc4262aec845544051e8fb8cbedeed87 (diff)
parentba3dfcf7bdd993e2a2bed8e55a3ea904f67e234f (diff)
downloadcwm-54c1b90725ffd4ae82eba410ce172466fea3dadc.tar.gz
cwm-54c1b90725ffd4ae82eba410ce172466fea3dadc.tar.xz
cwm-54c1b90725ffd4ae82eba410ce172466fea3dadc.zip
cvsimport
-rw-r--r--group.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/group.c b/group.c
index 877a824..4fce08c 100644
--- a/group.c
+++ b/group.c
@@ -216,12 +216,16 @@ void
 group_movetogroup(struct client_ctx *cc, int idx)
 {
 	struct screen_ctx	*sc = cc->sc;
+	struct group_ctx	*gc;
 
 	if (idx < 0 || idx >= CALMWM_NGROUPS)
 		err(1, "group_movetogroup: index out of range (%d)", idx);
 
-	if(sc->group_active != &sc->groups[idx])
+	gc = &sc->groups[idx];
+	if (gc->hidden) {
 		client_hide(cc);
+		gc->nhidden++;
+	}
 	group_add(&sc->groups[idx], cc);
 }