From: Ingo Bürk Date: Fri, 25 Sep 2015 17:43:43 +0000 (+0200) Subject: When moving a container to a mark, also check whether the container is being moved... X-Git-Tag: 4.11~3^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F1961%2Fhead;p=i3%2Fi3 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 --- diff --git a/src/con.c b/src/con.c index 1d2795c3..b74d0ce1 100644 --- a/src/con.c +++ b/src/con.c @@ -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; }