awful.mouse: fix client snapping

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Gregor Best 2011-03-20 22:51:00 +01:00 committed by Uli Schlachter
parent 3f40feb3c4
commit 35a5a74744
1 changed files with 5 additions and 0 deletions

View File

@ -110,6 +110,8 @@ function client.snap(c, snap, x, y, fixed_x, fixed_y)
local c = c or client.focus local c = c or client.focus
local cur_geom = c:geometry() local cur_geom = c:geometry()
local 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 edge = "none"
local edge2 = "none" local edge2 = "none"
geom.x = x or geom.x 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_x then geom.x = cur_geom.x end
if fixed_y then geom.y = cur_geom.y 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 return geom
end end