Move view marks properties to container struct

Like border properties, this will be needed to implement layout saving
and restoring.
This commit is contained in:
Ryan Dwyer 2018-10-31 21:27:38 +10:00
parent 480b03b734
commit 9fc736f4e1
16 changed files with 236 additions and 261 deletions

View file

@ -488,12 +488,12 @@ static struct cmd_results *cmd_move_container(int argc, char **argv) {
}
destination = seat_get_focus_inactive(seat, &new_output->node);
} else if (strcasecmp(argv[1], "mark") == 0) {
struct sway_view *dest_view = view_find_mark(argv[2]);
if (dest_view == NULL) {
struct sway_container *dest_con = container_find_mark(argv[2]);
if (dest_con == NULL) {
return cmd_results_new(CMD_FAILURE, "move",
"Mark '%s' not found", argv[2]);
}
destination = &dest_view->container->node;
destination = &dest_con->node;
} else {
return cmd_results_new(CMD_INVALID, "move", expected_syntax);
}