mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Split off group window restacking.
This commit is contained in:
parent
7f45471538
commit
30da2211dd
19
group.c
19
group.c
@ -35,6 +35,7 @@
|
|||||||
static void group_assign(struct group_ctx *, struct client_ctx *);
|
static void group_assign(struct group_ctx *, struct client_ctx *);
|
||||||
static void group_hide(struct screen_ctx *, struct group_ctx *);
|
static void group_hide(struct screen_ctx *, struct group_ctx *);
|
||||||
static void group_show(struct screen_ctx *, struct group_ctx *);
|
static void group_show(struct screen_ctx *, struct group_ctx *);
|
||||||
|
static void group_restack(struct screen_ctx *, struct group_ctx *);
|
||||||
static void group_set_hidden_state(struct group_ctx *);
|
static void group_set_hidden_state(struct group_ctx *);
|
||||||
static void group_setactive(struct screen_ctx *, long);
|
static void group_setactive(struct screen_ctx *, long);
|
||||||
static void group_set_names(struct screen_ctx *);
|
static void group_set_names(struct screen_ctx *);
|
||||||
@ -76,6 +77,20 @@ group_hide(struct screen_ctx *sc, struct group_ctx *gc)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
group_show(struct screen_ctx *sc, struct group_ctx *gc)
|
group_show(struct screen_ctx *sc, struct group_ctx *gc)
|
||||||
|
{
|
||||||
|
struct client_ctx *cc;
|
||||||
|
|
||||||
|
TAILQ_FOREACH(cc, &gc->clients, group_entry)
|
||||||
|
client_unhide(cc);
|
||||||
|
|
||||||
|
gc->hidden = 0;
|
||||||
|
|
||||||
|
group_restack(sc, gc);
|
||||||
|
group_setactive(sc, gc->shortcut);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
group_restack(struct screen_ctx *sc, struct group_ctx *gc)
|
||||||
{
|
{
|
||||||
struct client_ctx *cc;
|
struct client_ctx *cc;
|
||||||
Window *winlist;
|
Window *winlist;
|
||||||
@ -91,7 +106,6 @@ group_show(struct screen_ctx *sc, struct group_ctx *gc)
|
|||||||
/* Invert the stacking order for XRestackWindows(). */
|
/* Invert the stacking order for XRestackWindows(). */
|
||||||
TAILQ_FOREACH(cc, &gc->clients, group_entry) {
|
TAILQ_FOREACH(cc, &gc->clients, group_entry) {
|
||||||
winlist[highstack - cc->stackingorder] = cc->win;
|
winlist[highstack - cc->stackingorder] = cc->win;
|
||||||
client_unhide(cc);
|
|
||||||
nwins++;
|
nwins++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,9 +122,6 @@ group_show(struct screen_ctx *sc, struct group_ctx *gc)
|
|||||||
|
|
||||||
XRestackWindows(X_Dpy, winlist, nwins);
|
XRestackWindows(X_Dpy, winlist, nwins);
|
||||||
free(winlist);
|
free(winlist);
|
||||||
|
|
||||||
gc->hidden = 0;
|
|
||||||
group_setactive(sc, gc->shortcut);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user