When moving a container to a mark, also check whether the container is being moved to its own descendant and

reject the request if this is the case.

fixes #1957
next
Ingo Bürk 2015-09-25 19:43:43 +02:00
parent ee5db875c2
commit 594cd473b7
1 changed files with 2 additions and 2 deletions

View File

@ -955,8 +955,8 @@ bool con_move_to_mark(Con *con, const char *mark) {
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;
}