+/*
+ * Moves the given container to the given mark.
+ *
+ */
+bool con_move_to_mark(Con *con, const char *mark) {
+ Con *target = con_by_mark(mark);
+ if (target == NULL) {
+ DLOG("found no container with mark \"%s\"\n", mark);
+ return false;
+ }
+
+ /* For floating target containers, we just send the window to the same workspace. */
+ if (con_is_floating(target)) {
+ DLOG("target container is floating, moving container to target's workspace.\n");
+ con_move_to_workspace(con, con_get_workspace(target), true, false);
+ return true;
+ }
+
+ /* For split containers, we use the currently focused container within it.
+ * This allows setting marks on, e.g., tabbed containers which will move
+ * con to a new tab behind the focused tab. */
+ if (con_is_split(target)) {
+ DLOG("target is a split container, descending to the currently focused child.\n");
+ target = TAILQ_FIRST(&(target->focus_head));
+ }
+
+ return _con_move_to_con(con, target, false, true, false);
+}
+