[hackers] [wmii] Fix unfloating client via chording. Closes issue #144. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Fri, 23 Oct 2009 08:39:24 +0000 (UTC)

changeset: 2566:b89fc205928c
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Fri Oct 23 04:39:11 2009 -0400
files: cmd/wmii/layout.c
description:
Fix unfloating client via chording. Closes issue #144.

diff -r 11cdbba449f5 -r b89fc205928c cmd/wmii/layout.c
--- a/cmd/wmii/layout.c Thu Oct 22 22:33:37 2009 -0400
+++ b/cmd/wmii/layout.c Fri Oct 23 04:39:11 2009 -0400
@@ -34,6 +34,7 @@
 framerect(Framewin *f) {
         Rectangle r;
         Point p;
+ int scrn;
 
         r.min = ZP;
         if(f->orientation == OHoriz) {
@@ -46,11 +47,15 @@
         }
         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);
 }
 
Received on Fri Oct 23 2009 - 08:39:24 UTC

This archive was generated by hypermail 2.2.0 : Fri Oct 23 2009 - 08:48:06 UTC