Discard ref descendants in find_nearest_neighbor

Fixes #566.
This commit is contained in:
Bastien Dejean 2016-11-12 11:36:37 +01:00
parent eb483bbe12
commit b14ec64565

1
tree.c
View file

@ -974,6 +974,7 @@ void find_nearest_neighbor(coordinates_t *ref, coordinates_t *dst, direction_t d
if (f == ref->node ||
f->client == NULL ||
f->hidden ||
is_descendant(f, ref->node) ||
!node_matches(&loc, ref, sel) ||
!on_dir_side(rect, r, dir)) {
continue;