X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/faecd881fc44b5a045bc86f2101b89e2999d6521..6db29e08b3c34ef78f9b674c2ca36b6785193759:/layout/centerfair.lua?ds=sidebyside

diff --git a/layout/centerfair.lua b/layout/centerfair.lua
index d3225b4..1e8915d 100644
--- a/layout/centerfair.lua
+++ b/layout/centerfair.lua
@@ -90,7 +90,7 @@ function centerfair.arrange(p)
 
         -- Master client deserves a special treatement
         local g = {}
-        g.width = wa.width - (num_x  - 1) * width - num_x * 2*useless_gap - 2 
+        g.width = wa.width - (num_x  - 1) * width - num_x * 2*useless_gap - 2
         g.height = wa.height - 2*useless_gap - 2
         g.x = offset_x + useless_gap + global_border
         g.y = offset_y + global_border
@@ -104,7 +104,7 @@ function centerfair.arrange(p)
         do
             local remaining_clients = #cls-1
             local ncol_min = math.ceil(remaining_clients/(num_x-1))
-            if ncol >= ncol_min 
+            if ncol >= ncol_min
             then
                 for i = (num_x-1), 1, -1 do
                     if (remaining_clients-i+1) < ncol
@@ -146,7 +146,7 @@ function centerfair.arrange(p)
             to_remove = 2
             g.height = math.floor((wa.height - (num_y[i] * useless_gap)) / num_y[i])
             g.y = offset_y + global_border
-            for j = 1, (num_y[i]-1) do
+            for j = 0, (num_y[i]-2) do
                 cls[nclient]:geometry(g)
                 nclient = nclient - 1
                 g.y = g.y + g.height+useless_gap + 2