Signed-off-by: Fabienne Ducroquet <fabi...@gmail.com>
---
 lib/awful/layout/suit/spiral.lua.in |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/lib/awful/layout/suit/spiral.lua.in 
b/lib/awful/layout/suit/spiral.lua.in
index 88e3436..6a52d14 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
 
-- 
1.6.3.3


-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to