about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--calmwm.h1
-rw-r--r--client.c6
-rw-r--r--group.c11
3 files changed, 3 insertions, 15 deletions
diff --git a/calmwm.h b/calmwm.h
index cb10f19..82f43aa 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -348,7 +348,6 @@ void			 client_warp(struct client_ctx *);
 
 void			 group_alltoggle(struct screen_ctx *);
 void			 group_autogroup(struct client_ctx *);
-void			 group_client_delete(struct client_ctx *);
 void			 group_cycle(struct screen_ctx *, int);
 void			 group_hidetoggle(struct screen_ctx *, int);
 void			 group_init(struct screen_ctx *);
diff --git a/client.c b/client.c
index c8d3801..7b94777 100644
--- a/client.c
+++ b/client.c
@@ -149,13 +149,10 @@ client_delete(struct client_ctx *cc)
 	struct screen_ctx	*sc = cc->sc;
 	struct winname		*wn;
 
-	group_client_delete(cc);
-
 	XGrabServer(X_Dpy);
 	cc->state = WithdrawnState;
 	xu_set_wm_state(cc->win, cc->state);
 	XRemoveFromSaveSet(X_Dpy, cc->win);
-
 	XSync(X_Dpy, False);
 	XUngrabServer(X_Dpy);
 
@@ -164,6 +161,9 @@ client_delete(struct client_ctx *cc)
 
 	xu_ewmh_net_client_list(sc);
 
+	if (cc->group != NULL)
+		TAILQ_REMOVE(&cc->group->clients, cc, group_entry);
+
 	if (cc == client_current())
 		client_none(sc);
 
diff --git a/group.c b/group.c
index d73f8c4..f7a0a2d 100644
--- a/group.c
+++ b/group.c
@@ -308,17 +308,6 @@ group_cycle(struct screen_ctx *sc, int flags)
 		group_setactive(sc, showgroup->shortcut);
 }
 
-/* called when a client is deleted */
-void
-group_client_delete(struct client_ctx *cc)
-{
-	if (cc->group == NULL)
-		return;
-
-	TAILQ_REMOVE(&cc->group->clients, cc, group_entry);
-	cc->group = NULL; /* he he */
-}
-
 void
 group_menu(XButtonEvent *e)
 {