mirror of https://github.com/0intro/wmii
Fix /ctl reads.
This commit is contained in:
parent
268260d225
commit
86ef6e916e
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue