Both were expecting a client, but are actually passed a geometry.

Signed-off-by: Andreas Hübner <[email protected]>
---
 lib/awful/client.lua.in |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in
index bfd361f..47c0d40 100644
--- a/lib/awful/client.lua.in
+++ b/lib/awful/client.lua.in
@@ -236,15 +236,13 @@ function next(i, c)
     end
 end
 
--- Return true whether client B is in the right direction
--- compared to client A.
+-- Return true whether geometry B is in the right direction
+-- compared to geometry A.
 -- @param dir The direction.
--- @param cA The first client.
--- @param cB The second client.
+-- @param gA The first geometry.
+-- @param gB The second geometry.
 -- @return True if B is in the direction of A.
-local function is_in_direction(dir, cA, cB)
-    local gA = cA:geometry()
-    local gB = cB:geometry()
+local function is_in_direction(dir, gA, gB)
     if dir == "up" then
         return gA.y > gB.y
     elseif dir == "down" then
@@ -263,13 +261,10 @@ end
 -- This avoid the focus of an upper client when you move to the right in a
 -- tilebottom layout with nmaster=2 and 5 clients open, for instance.
 -- @param dir The direction.
--- @param cA The first client.
--- @param cB The second client.
+-- @param cA The first geometry.
+-- @param cB The second geometry.
 -- @return The distance between the clients.
-local function calculate_distance(dir, cA, cB)
-    local gA = cA:geometry()
-    local gB = cB:geometry()
-
+local function calculate_distance(dir, gA, gB)
     if dir == "up" then
         gB.y = gB.y + gB.height
     elseif dir == "down" then
-- 
1.6.3.3


-- 
To unsubscribe, send mail to [email protected].

Reply via email to