changeset: 2569:5787e244f26d
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Sat Oct 24 03:49:10 2009 -0400
files: cmd/wmii/float.c cmd/wmii/frame.c
description:
More Xinerama float placement fixes. Closes issue #146.
diff -r 000262213bb9 -r 5787e244f26d cmd/wmii/float.c
--- a/cmd/wmii/float.c Sat Oct 24 01:50:52 2009 -0400
+++ b/cmd/wmii/float.c Sat Oct 24 03:49:10 2009 -0400
@@ -210,9 +210,7 @@
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;
@@ -233,12 +231,13 @@
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);
diff -r 000262213bb9 -r 5787e244f26d cmd/wmii/frame.c
--- a/cmd/wmii/frame.c Sat Oct 24 01:50:52 2009 -0400
+++ b/cmd/wmii/frame.c Sat Oct 24 03:49:10 2009 -0400
@@ -35,6 +35,7 @@
c->sel = f;
}
f->collapsed = false;
+ f->screen = -1;
f->oldarea = -1;
f->oldscreen = -1;
Received on Sat Oct 24 2009 - 07:49:44 UTC
This archive was generated by hypermail 2.2.0 : Sat Oct 24 2009 - 08:00:07 UTC