mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
remove group in client_delete directly.
This commit is contained in:
parent
27854d9061
commit
1db7cc2a18
1
calmwm.h
1
calmwm.h
@ -348,7 +348,6 @@ void client_warp(struct client_ctx *);
|
|||||||
|
|
||||||
void group_alltoggle(struct screen_ctx *);
|
void group_alltoggle(struct screen_ctx *);
|
||||||
void group_autogroup(struct client_ctx *);
|
void group_autogroup(struct client_ctx *);
|
||||||
void group_client_delete(struct client_ctx *);
|
|
||||||
void group_cycle(struct screen_ctx *, int);
|
void group_cycle(struct screen_ctx *, int);
|
||||||
void group_hidetoggle(struct screen_ctx *, int);
|
void group_hidetoggle(struct screen_ctx *, int);
|
||||||
void group_init(struct screen_ctx *);
|
void group_init(struct screen_ctx *);
|
||||||
|
6
client.c
6
client.c
@ -149,13 +149,10 @@ client_delete(struct client_ctx *cc)
|
|||||||
struct screen_ctx *sc = cc->sc;
|
struct screen_ctx *sc = cc->sc;
|
||||||
struct winname *wn;
|
struct winname *wn;
|
||||||
|
|
||||||
group_client_delete(cc);
|
|
||||||
|
|
||||||
XGrabServer(X_Dpy);
|
XGrabServer(X_Dpy);
|
||||||
cc->state = WithdrawnState;
|
cc->state = WithdrawnState;
|
||||||
xu_set_wm_state(cc->win, cc->state);
|
xu_set_wm_state(cc->win, cc->state);
|
||||||
XRemoveFromSaveSet(X_Dpy, cc->win);
|
XRemoveFromSaveSet(X_Dpy, cc->win);
|
||||||
|
|
||||||
XSync(X_Dpy, False);
|
XSync(X_Dpy, False);
|
||||||
XUngrabServer(X_Dpy);
|
XUngrabServer(X_Dpy);
|
||||||
|
|
||||||
@ -164,6 +161,9 @@ client_delete(struct client_ctx *cc)
|
|||||||
|
|
||||||
xu_ewmh_net_client_list(sc);
|
xu_ewmh_net_client_list(sc);
|
||||||
|
|
||||||
|
if (cc->group != NULL)
|
||||||
|
TAILQ_REMOVE(&cc->group->clients, cc, group_entry);
|
||||||
|
|
||||||
if (cc == client_current())
|
if (cc == client_current())
|
||||||
client_none(sc);
|
client_none(sc);
|
||||||
|
|
||||||
|
11
group.c
11
group.c
@ -308,17 +308,6 @@ group_cycle(struct screen_ctx *sc, int flags)
|
|||||||
group_setactive(sc, showgroup->shortcut);
|
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
|
void
|
||||||
group_menu(XButtonEvent *e)
|
group_menu(XButtonEvent *e)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user