Take into account bar and struts when placing floats. Closes issue #283.

This commit is contained in:
Kris Maglione 2011-09-15 13:29:41 -04:00
parent 708db8d88c
commit ff821dd113
1 changed files with 8 additions and 2 deletions

View File

@ -162,12 +162,14 @@ float_placeframe(Frame *f) {
Vector_rect *vp; Vector_rect *vp;
Rectangle r; Rectangle r;
Point dim, p; Point dim, p;
Area *a, *sel;
Client *c; Client *c;
Frame *ff; Frame *ff;
Area *a, *sel; View *v;
long area, l; long area, l;
int i, s; int i, s;
v = f->view;
a = f->area; a = f->area;
c = f->client; c = f->client;
@ -212,7 +214,11 @@ float_placeframe(Frame *f) {
s = sel->screen; s = sel->screen;
} }
r = s == -1 ? a->r : screens[s]->r; if (s == -1)
r = a->r;
else
r = v->r[s];
vp = unique_rects(&vec, r); vp = unique_rects(&vec, r);
area = LONG_MAX; area = LONG_MAX;