aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorokan2013-05-06 16:03:11 +0000
committerokan2013-05-06 16:03:11 +0000
commit99735d22776eb0d958a17a9b07471da6dafabd42 (patch)
treed03c1ce860f72fe5050f04ce27d5af04928a32e0
parent171d4921d9f4368b1ea53baca6f4a35444ceb784 (diff)
downloadcwm-99735d22776eb0d958a17a9b07471da6dafabd42.tar.gz
remove group in client_delete directly.
-rw-r--r--calmwm.h3
-rw-r--r--client.c8
-rw-r--r--group.c13
3 files changed, 6 insertions, 18 deletions
diff --git a/calmwm.h b/calmwm.h
index 22c2ed2..89ce0cd 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: calmwm.h,v 1.193 2013/05/02 17:25:15 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.194 2013/05/06 16:03:11 okan Exp $
*/
#ifndef _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 48d9063..bd46245 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.127 2013/04/17 13:57:06 okan Exp $
+ * $OpenBSD: client.c,v 1.128 2013/05/06 16:03:11 okan Exp $
*/
#include <sys/param.h>
@@ -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 90409ef..bf8f694 100644
--- a/group.c
+++ b/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.75 2013/04/30 21:10:23 okan Exp $
+ * $OpenBSD: group.c,v 1.76 2013/05/06 16:03:11 okan Exp $
*/
#include <sys/param.h>
@@ -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)
{