wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit b5442734cfc90df8f962cb30be797eb64c3fc79d
parent 6826773d31e90f001d173674be01adacdcef4829
Author: Kris Maglione <kris@suckless.org>
Date:   Fri, 23 Oct 2009 04:39:11 -0400

Fix unfloating client via chording. Closes issue #144.

Diffstat:
cmd/wmii/layout.c | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/cmd/wmii/layout.c b/cmd/wmii/layout.c @@ -34,6 +34,7 @@ static Rectangle framerect(Framewin *f) { Rectangle r; Point p; + int scrn; r.min = ZP; if(f->orientation == OHoriz) { @@ -46,11 +47,15 @@ framerect(Framewin *f) { } r = rectaddpt(r, f->pt); + scrn = f->screen; + if (scrn == -1) + scrn = max(ownerscreen(f->f->r), 0); + /* Keep onscreen */ p = ZP; p.x -= min(0, r.min.x); - p.x -= max(0, r.max.x - screens[f->screen]->r.max.x); - p.y -= max(0, r.max.y - screens[f->screen]->brect.min.y - Dy(r)/2); + p.x -= max(0, r.max.x - screens[scrn]->r.max.x); + p.y -= max(0, r.max.y - screens[scrn]->brect.min.y - Dy(r)/2); return rectaddpt(r, p); }