]> git.sur5r.net Git - i3/i3/commitdiff
When moving a container to a mark, also check whether the container is being moved... 1961/head
authorIngo Bürk <ingo.buerk@tngtech.com>
Fri, 25 Sep 2015 17:43:43 +0000 (19:43 +0200)
committerIngo Bürk <ingo.buerk@tngtech.com>
Fri, 25 Sep 2015 17:43:43 +0000 (19:43 +0200)
reject the request if this is the case.

fixes #1957

src/con.c

index 1d2795c303c179019f38c5ad29778a8215a3d790..b74d0ce1a5e269e28a7a089d84a45bf9df54d3f7 100644 (file)
--- 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;
     }