Disallow moving a container to itself since this would crash i3.

This commit is contained in:
Ingo Bürk
2015-04-15 19:59:53 +02:00
parent 05e8caab17
commit 283b231290
2 changed files with 20 additions and 0 deletions

View File

@ -914,6 +914,11 @@ 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");
return false;
}
return _con_move_to_con(con, target, false, true, false);
}