From 07e63bd5642fda0fa38f9ae03a03925b35e31c8d Mon Sep 17 00:00:00 2001 From: Gregor Best Date: Sun, 20 Mar 2011 22:51:00 +0100 Subject: [PATCH] awful.mouse: fix client snapping Signed-off-by: Gregor Best Signed-off-by: Uli Schlachter --- lib/awful/mouse/init.lua.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/awful/mouse/init.lua.in b/lib/awful/mouse/init.lua.in index af6c7b622..95924884d 100644 --- a/lib/awful/mouse/init.lua.in +++ b/lib/awful/mouse/init.lua.in @@ -110,6 +110,8 @@ function client.snap(c, snap, x, y, fixed_x, fixed_y) local c = c or client.focus local cur_geom = c:geometry() local geom = c:geometry() + geom.width = geom.width + (2 * c.border_width) + geom.height = geom.height + (2 * c.border_width) local edge = "none" local edge2 = "none" geom.x = x or geom.x @@ -146,6 +148,9 @@ function client.snap(c, snap, x, y, fixed_x, fixed_y) if fixed_x then geom.x = cur_geom.x end if fixed_y then geom.y = cur_geom.y end + geom.width = geom.width - (2 * c.border_width) + geom.height = geom.height - (2 * c.border_width) + return geom end