mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Add 'group-close-[n]' action to close all windows within specified group.
heavily based on a diff from Nam Nguyen.
This commit is contained in:
17
group.c
17
group.c
@ -249,6 +249,23 @@ group_only(struct screen_ctx *sc, int idx)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
group_close(struct screen_ctx *sc, int idx)
|
||||
{
|
||||
struct group_ctx *gc;
|
||||
struct client_ctx *cc;
|
||||
|
||||
if (idx < 0 || idx >= Conf.ngroups)
|
||||
return;
|
||||
|
||||
TAILQ_FOREACH(gc, &sc->groupq, entry) {
|
||||
if (gc->num == idx) {
|
||||
TAILQ_FOREACH(cc, &gc->clientq, group_entry)
|
||||
client_close(cc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
group_cycle(struct screen_ctx *sc, int flags)
|
||||
{
|
||||
|
Reference in New Issue
Block a user