mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
move client_vertmaximize to a more sensible location, purely for readability.
"don't mind at all" oga@
This commit is contained in:
parent
8afabd6c55
commit
2798cdc9a7
38
client.c
38
client.c
@ -338,6 +338,25 @@ client_maximize(struct client_ctx *cc)
|
||||
client_resize(cc);
|
||||
}
|
||||
|
||||
void
|
||||
client_vertmaximize(struct client_ctx *cc)
|
||||
{
|
||||
struct screen_ctx *sc = CCTOSC(cc);
|
||||
|
||||
if (cc->flags & CLIENT_VMAXIMIZED) {
|
||||
cc->geom = cc->savegeom;
|
||||
} else {
|
||||
if (!(cc->flags & CLIENT_MAXIMIZED))
|
||||
cc->savegeom = cc->geom;
|
||||
cc->geom.y = cc->bwidth + Conf.gap_top;
|
||||
cc->geom.height = (sc->ymax - cc->bwidth * 2) -
|
||||
(Conf.gap_top + Conf.gap_bottom);
|
||||
cc->flags |= CLIENT_DOVMAXIMIZE;
|
||||
}
|
||||
|
||||
client_resize(cc);
|
||||
}
|
||||
|
||||
void
|
||||
client_resize(struct client_ctx *cc)
|
||||
{
|
||||
@ -692,25 +711,6 @@ client_placecalc(struct client_ctx *cc)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
client_vertmaximize(struct client_ctx *cc)
|
||||
{
|
||||
struct screen_ctx *sc = CCTOSC(cc);
|
||||
|
||||
if (cc->flags & CLIENT_VMAXIMIZED) {
|
||||
cc->geom = cc->savegeom;
|
||||
} else {
|
||||
if (!(cc->flags & CLIENT_MAXIMIZED))
|
||||
cc->savegeom = cc->geom;
|
||||
cc->geom.y = cc->bwidth + Conf.gap_top;
|
||||
cc->geom.height = (sc->ymax - cc->bwidth * 2) -
|
||||
(Conf.gap_top + Conf.gap_bottom);
|
||||
cc->flags |= CLIENT_DOVMAXIMIZE;
|
||||
}
|
||||
|
||||
client_resize(cc);
|
||||
}
|
||||
|
||||
void
|
||||
client_mtf(struct client_ctx *cc)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user