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:
parent
06f4a30d5a
commit
6511042f82
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue