placement: Fix an semi-infinite loop when attaching to geometries

It would add a new connection each time and eventually get very
slow.

An regression test will be published later.
This commit is contained in:
Emmanuel Lepage Vallee 2016-05-04 23:45:16 -04:00
parent 087d578755
commit 3945f13fc4
1 changed files with 3 additions and 0 deletions

View File

@ -450,6 +450,9 @@ local function attach(d, position_f, args)
if not args.attach then return end if not args.attach then return end
-- Avoid a connection loop
args = setmetatable({attach=false}, {__index=args})
d = d or capi.client.focus d = d or capi.client.focus
if not d then return end if not d then return end