]> git.sur5r.net Git - i3/i3/commitdiff
Implement the command 'move container to mark <mark>' using 'con_move_to_mark'.
authorIngo Bürk <ingo.buerk@tngtech.com>
Tue, 14 Apr 2015 15:57:33 +0000 (17:57 +0200)
committerIngo Bürk <ingo.buerk@tngtech.com>
Sun, 19 Apr 2015 18:57:49 +0000 (20:57 +0200)
src/commands.c

index 736c40271be4f0fb6b803276763516741c780235..adfffe5fbb612384a0bdb8093a30f1129e136581 100644 (file)
@@ -1172,7 +1172,19 @@ void cmd_move_con_to_output(I3_CMD, char *name) {
  *
  */
 void cmd_move_con_to_mark(I3_CMD, char *mark) {
-    ysuccess(true);
+    DLOG("moving window to mark \"%s\"\n", mark);
+
+    HANDLE_EMPTY_MATCH;
+
+    bool result = true;
+    owindow *current;
+    TAILQ_FOREACH(current, &owindows, owindows) {
+        DLOG("moving matched window %p / %s to mark \"%s\"\n", current->con, current->con->name, mark);
+        result &= con_move_to_mark(current->con, mark);
+    }
+
+    cmd_output->needs_tree_render = true;
+    ysuccess(result);
 }
 
 /*