mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
save an X call and use what we already have stored.
ok oga@
This commit is contained in:
parent
96f03c8cbc
commit
8afabd6c55
12
client.c
12
client.c
@ -321,21 +321,17 @@ client_gravitate(struct client_ctx *cc, int yes)
|
|||||||
void
|
void
|
||||||
client_maximize(struct client_ctx *cc)
|
client_maximize(struct client_ctx *cc)
|
||||||
{
|
{
|
||||||
|
struct screen_ctx *sc = CCTOSC(cc);
|
||||||
|
|
||||||
if (cc->flags & CLIENT_MAXIMIZED) {
|
if (cc->flags & CLIENT_MAXIMIZED) {
|
||||||
cc->geom = cc->savegeom;
|
cc->geom = cc->savegeom;
|
||||||
} else {
|
} else {
|
||||||
XWindowAttributes rootwin_geom;
|
|
||||||
struct screen_ctx *sc = CCTOSC(cc);
|
|
||||||
|
|
||||||
XGetWindowAttributes(X_Dpy, sc->rootwin, &rootwin_geom);
|
|
||||||
if (!(cc->flags & CLIENT_VMAXIMIZED))
|
if (!(cc->flags & CLIENT_VMAXIMIZED))
|
||||||
cc->savegeom = cc->geom;
|
cc->savegeom = cc->geom;
|
||||||
cc->geom.x = Conf.gap_left;
|
cc->geom.x = Conf.gap_left;
|
||||||
cc->geom.y = Conf.gap_top;
|
cc->geom.y = Conf.gap_top;
|
||||||
cc->geom.height = rootwin_geom.height -
|
cc->geom.height = sc->ymax - (Conf.gap_top + Conf.gap_bottom);
|
||||||
(Conf.gap_top + Conf.gap_bottom);
|
cc->geom.width = sc->xmax - (Conf.gap_left + Conf.gap_right);
|
||||||
cc->geom.width = rootwin_geom.width -
|
|
||||||
(Conf.gap_left + Conf.gap_right);
|
|
||||||
cc->flags |= CLIENT_DOMAXIMIZE;
|
cc->flags |= CLIENT_DOMAXIMIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user