target = TAILQ_FIRST(&(target->focus_head));
}
- if (con == target) {
- DLOG("cannot move the container to itself, aborting.\n");
+ if (con == target || con == target->parent) {
+ DLOG("cannot move the container to or inside itself, aborting.\n");
return false;
}