Fix /ctl reads.

This commit is contained in:
Kris Maglione 2007-06-28 10:57:24 -04:00
parent 268260d225
commit 86ef6e916e
3 changed files with 4 additions and 4 deletions

View File

@ -222,10 +222,10 @@ gravclient(Client *c, Rectangle rd) {
r = c->sel->r;
else
r = c->sel->revert;
r = gravitate(r, c->r, h->grav);
r = gravitate(c->r, r, h->grav);
if(h->gravstatic)
r = rectaddpt(r, sp);
return frame2client(c->sel, r);
return frame2client(nil, r);
}else {
r = client2frame(nil, rd);
r = gravitate(r, rd, h->grav);

View File

@ -351,7 +351,7 @@ read_root_ctl(void) {
b = buffer;
e = b + sizeof(buffer);
#define print(...) if(b < e) snprintf(b, e-b, __VA_ARGS__)
#define print(...) if(b < e) b += snprintf(b, e-b, __VA_ARGS__)
print("view %s\n", screen->sel->name);
print("focuscolors %s\n", def.focuscolor.colstr);
print("normcolors %s\n", def.normcolor.colstr);

View File

@ -805,5 +805,5 @@ gravitate(Rectangle rc, Rectangle rf, Point grav) {
d = divpt(d, Pt(2, 2));
d = mulpt(d, grav);
return rectsubpt(rc, d);
return rectaddpt(rc, d);
}