client: Fix get_client_in_direction

Both is_in_direction() and calculate_distance() expect clients
instead of geometries.

Signed-off-by: Sébastien Gross <seb•ɱɩɲʋʃ•awesome•ɑƬ•chezwam•ɖɵʈ•org>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Sébastien Gross 2009-09-03 15:38:02 +02:00 committed by Julien Danjou
parent 06f4a30d5a
commit 6511042f82
1 changed files with 2 additions and 2 deletions

View File

@ -297,10 +297,10 @@ local function get_client_in_direction(dir, c)
-- We check each client. -- We check each client.
for i, c in ipairs(cls) do for i, c in ipairs(cls) do
-- Check geometry to see if client is located in the right direction. -- Check geometry to see if client is located in the right direction.
if is_in_direction(dir, geometry, c:geometry()) then if is_in_direction(dir, sel, c) then
-- Calculate distance between focused client and checked client. -- Calculate distance between focused client and checked client.
dist = calculate_distance(dir, geometry, c:geometry()) dist = calculate_distance(dir, sel, c)
-- If distance is shorter then keep the client. -- If distance is shorter then keep the client.
if not target or dist < dist_min then if not target or dist < dist_min then