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
This commit is contained in:
parent
ee5db875c2
commit
594cd473b7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue