Permalink
Browse files

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

  • Loading branch information...
1 parent cfaa4bf commit bd06ddbc91a75b5a7db3c0b1b6787a3273451d46 Kris Maglione committed Sep 15, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 cmd/wmii/float.c
View
@@ -162,12 +162,14 @@ float_placeframe(Frame *f) {
Vector_rect *vp;
Rectangle r;
Point dim, p;
+ Area *a, *sel;
Client *c;
Frame *ff;
- Area *a, *sel;
+ View *v;
long area, l;
int i, s;
+ v = f->view;
a = f->area;
c = f->client;
@@ -212,7 +214,11 @@ float_placeframe(Frame *f) {
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);
area = LONG_MAX;

0 comments on commit bd06ddb

Please sign in to comment.