int tl, tt, tr, tb; /* 1 past the target's edges on each side */
target = it->data;
- if (target == c) continue; /* don't snap to self */
+ /* don't snap to self or non-visibles */
+ if (!target->frame->visible || target == c) continue;
tl = target->frame->area.x - 1;
tt = target->frame->area.y - 1;