From 3945f13fc4816310d500ef51da50452c6334d6e7 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 4 May 2016 23:45:16 -0400 Subject: [PATCH] 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. --- lib/awful/placement.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index 1f2dad329..793923165 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -450,6 +450,9 @@ local function attach(d, position_f, args) if not args.attach then return end + -- Avoid a connection loop + args = setmetatable({attach=false}, {__index=args}) + d = d or capi.client.focus if not d then return end