On Mon, Mar 21, 2011 at 07:39:36AM +0100, Uli Schlachter wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Am 20.03.2011 23:01, Gregor Best wrote: > > Attached is a patch that doesn't suck. The previous one forgot > > subtracting the border_width before returning the new geometry, > > resulting in scary growing clients. > > Pushed, > thanks. > [...]
Attached is a little follow-up to the previous patch. It fixes
interclient border-snapping. My previous patch introduced a few oddities
regarding offsets when snapping clients agains each other, but that
should be fixed now.
--
$l="\n";$p=q-sub r{rand}sub c{((shift)**2+(shift)**2)<1}while(
$i++<=$s){$t++if c r,r}die("Gregor Best, 0xDB9F9A7C, ".($t/$s*
4).$l)-;$s+=ord$$|$_ for split //,$p;srand($s|$$);eval$p;die$@
From 9db2b953e509238b95668a9a66647f2bbbec41cd Mon Sep 17 00:00:00 2001 From: Gregor Best <[email protected]> Date: Mon, 28 Mar 2011 11:21:17 +0200 Subject: [PATCH] awful.mouse: fix interclient border snapping Signed-off-by: Gregor Best <[email protected]> --- lib/awful/mouse/init.lua.in | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/awful/mouse/init.lua.in b/lib/awful/mouse/init.lua.in index 9592488..e25cb0a 100644 --- a/lib/awful/mouse/init.lua.in +++ b/lib/awful/mouse/init.lua.in @@ -138,6 +138,9 @@ function client.snap(c, snap, x, y, fixed_x, fixed_y) c:struts(struts) end + geom.x = geom.x - (2 * c.border_width) + geom.y = geom.y - (2 * c.border_width) + for k, snapper in ipairs(aclient.visible(c.screen)) do if snapper ~= c then geom = snap_outside(geom, snapper:geometry(), snap) @@ -150,6 +153,8 @@ function client.snap(c, snap, x, y, fixed_x, fixed_y) geom.width = geom.width - (2 * c.border_width) geom.height = geom.height - (2 * c.border_width) + geom.x = geom.x + (2 * c.border_width) + geom.y = geom.y + (2 * c.border_width) return geom end -- 1.7.3.4
pgpZU8kULV1wp.pgp
Description: PGP signature
