awful.mouse: fix interclient border 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-28 11:21:17 +02:00 committed by Uli Schlachter
parent 13364a0181
commit 33e88ea8d4
1 changed files with 5 additions and 0 deletions

View File

@ -138,6 +138,9 @@ function client.snap(c, snap, x, y, fixed_x, fixed_y)
c:struts(struts) c:struts(struts)
end 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 for k, snapper in ipairs(aclient.visible(c.screen)) do
if snapper ~= c then if snapper ~= c then
geom = snap_outside(geom, snapper:geometry(), snap) 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.width = geom.width - (2 * c.border_width)
geom.height = geom.height - (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 return geom
end end