mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Use screen's saved view instead of re-querying the server.
This commit is contained in:
parent
14c17b5f9b
commit
f3211427c1
13
client.c
13
client.c
@ -752,17 +752,12 @@ client_placecalc(struct client_ctx *cc)
|
||||
int xslack, yslack;
|
||||
|
||||
if (cc->hint.flags & (USPosition | PPosition)) {
|
||||
int wmax, hmax;
|
||||
|
||||
wmax = DisplayWidth(X_Dpy, sc->which);
|
||||
hmax = DisplayHeight(X_Dpy, sc->which);
|
||||
|
||||
if (cc->geom.x >= wmax)
|
||||
cc->geom.x = wmax - cc->bwidth - 1;
|
||||
if (cc->geom.x >= sc->view.w)
|
||||
cc->geom.x = sc->view.w - cc->bwidth - 1;
|
||||
if (cc->geom.x + cc->geom.w + cc->bwidth <= 0)
|
||||
cc->geom.x = -(cc->geom.w + cc->bwidth - 1);
|
||||
if (cc->geom.y >= hmax)
|
||||
cc->geom.x = hmax - cc->bwidth - 1;
|
||||
if (cc->geom.y >= sc->view.h)
|
||||
cc->geom.x = sc->view.h - cc->bwidth - 1;
|
||||
if (cc->geom.y + cc->geom.h + cc->bwidth <= 0)
|
||||
cc->geom.y = -(cc->geom.h + cc->bwidth - 1);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user