Skip to content

Commit

Permalink
More Xinerama float placement fixes. Closes issue #146.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Maglione committed Oct 24, 2009
1 parent b1d9171 commit 85ccb02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cmd/wmii/float.c
Expand Up @@ -210,9 +210,7 @@ float_placeframe(Frame *f) {
s = sel->screen;
}

r = a->r;
if (s > -1)
r = screens[s]->r;
r = s == -1 ? a->r : screens[s]->r;
vp = unique_rects(&vec, r);

area = LONG_MAX;
Expand All @@ -233,12 +231,13 @@ float_placeframe(Frame *f) {

if(area == LONG_MAX) {
/* Cascade. */
s = max(s, 0);
ff = a->sel;
if(ff)
p = addpt(ff->r.min, Pt(Dy(ff->titlebar), Dy(ff->titlebar)));
if(p.x + Dx(f->r) > Dx(screen->r) ||
p.y + Dy(f->r) > screen->brect.min.y)
p = ZP;
if(p.x + Dx(f->r) > screens[s]->r.max.x ||
p.y + Dy(f->r) > screens[s]->r.max.y)
p = screens[s]->r.min;
}

f->floatr = rectsetorigin(f->r, p);
Expand Down
1 change: 1 addition & 0 deletions cmd/wmii/frame.c
Expand Up @@ -35,6 +35,7 @@ frame_create(Client *c, View *v) {
c->sel = f;
}
f->collapsed = false;
f->screen = -1;
f->oldarea = -1;
f->oldscreen = -1;

Expand Down

0 comments on commit 85ccb02

Please sign in to comment.