mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
we already have ymax, so use it instead of asking X for it again.
ok oga@
This commit is contained in:
parent
b23fad3987
commit
85e6c61360
10
client.c
10
client.c
@ -699,19 +699,15 @@ client_placecalc(struct client_ctx *cc)
|
|||||||
void
|
void
|
||||||
client_vertmaximize(struct client_ctx *cc)
|
client_vertmaximize(struct client_ctx *cc)
|
||||||
{
|
{
|
||||||
|
struct screen_ctx *sc = CCTOSC(cc);
|
||||||
|
|
||||||
if (cc->flags & CLIENT_VMAXIMIZED) {
|
if (cc->flags & CLIENT_VMAXIMIZED) {
|
||||||
cc->geom = cc->savegeom;
|
cc->geom = cc->savegeom;
|
||||||
} else {
|
} else {
|
||||||
struct screen_ctx *sc = CCTOSC(cc);
|
|
||||||
int display_height;
|
|
||||||
|
|
||||||
display_height = DisplayHeight(X_Dpy, sc->which) -
|
|
||||||
cc->bwidth * 2;
|
|
||||||
|
|
||||||
if (!(cc->flags & CLIENT_MAXIMIZED))
|
if (!(cc->flags & CLIENT_MAXIMIZED))
|
||||||
cc->savegeom = cc->geom;
|
cc->savegeom = cc->geom;
|
||||||
cc->geom.y = cc->bwidth + Conf.gap_top;
|
cc->geom.y = cc->bwidth + Conf.gap_top;
|
||||||
cc->geom.height = display_height -
|
cc->geom.height = (sc->ymax - cc->bwidth * 2) -
|
||||||
(Conf.gap_top + Conf.gap_bottom);
|
(Conf.gap_top + Conf.gap_bottom);
|
||||||
cc->flags |= CLIENT_DOVMAXIMIZE;
|
cc->flags |= CLIENT_DOVMAXIMIZE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user