From 391e3ea9542c983c95bacd182f45e31c3117e672 Mon Sep 17 00:00:00 2001 From: Fabienne Ducroquet Date: Wed, 19 Aug 2009 20:37:25 +0200 Subject: [PATCH] layout: spiral: remove useless local variables Signed-off-by: Fabienne Ducroquet Signed-off-by: Julien Danjou --- lib/awful/layout/suit/spiral.lua.in | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/lib/awful/layout/suit/spiral.lua.in b/lib/awful/layout/suit/spiral.lua.in index 88e343620..6a52d14c1 100644 --- a/lib/awful/layout/suit/spiral.lua.in +++ b/lib/awful/layout/suit/spiral.lua.in @@ -13,38 +13,32 @@ module("awful.layout.suit.spiral") local function spiral(p, spiral) local wa = p.workarea local cls = p.clients - local n = #cls - local nx = wa.x - local ny = wa.y - local nw = wa.width - local nh = wa.height for k, c in ipairs(cls) do if k < n then if k % 2 == 0 then - nh = nh / 2 + wa.height = wa.height / 2 else - nw = nw / 2 + wa.width = wa.width / 2 end end if k % 4 == 0 and spiral then - nx = nx - nw + wa.x = wa.x - wa.width elseif k % 2 == 0 or (k % 4 == 3 and k < n and spiral) then - nx = nx + nw + wa.x = wa.x + wa.width end if k % 4 == 1 and k ~= 1 and spiral then - ny = ny - nh + wa.y = wa.y - wa.height elseif k % 2 == 1 and k ~= 1 or (k % 4 == 0 and k < n and spiral) then - ny = ny + nh + wa.y = wa.y + wa.height end - local geom = { x = nx, y = ny, width = nw, height = nh } - c:geometry(geom) + c:geometry(wa) end end