diff options
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/focus.c | 3 | ||||
-rw-r--r-- | sway/commands/layout.c | 2 | ||||
-rw-r--r-- | sway/commands/move.c | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index 83b8c64a..58721b7e 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c @@ -102,6 +102,9 @@ static struct sway_node *node_get_in_direction(struct sway_container *container, // Fullscreen container with a direction - go straight to outputs struct sway_output *output = container->workspace->output; struct sway_output *new_output = output_get_in_direction(output, dir); + if (!new_output) { + return NULL; + } return get_node_in_output_direction(new_output, dir); } if (dir == MOVE_PARENT) { diff --git a/sway/commands/layout.c b/sway/commands/layout.c index 44ce2970..ef3ec1cb 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c @@ -29,7 +29,7 @@ static enum sway_container_layout get_layout_toggle(int argc, char **argv, enum sway_container_layout layout, enum sway_container_layout prev_split_layout) { // "layout toggle" - if (argc == 0) { + if (argc == 1) { return layout == L_HORIZ ? L_VERT : L_HORIZ; } diff --git a/sway/commands/move.c b/sway/commands/move.c index 7b503624..59f1cf78 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -117,7 +117,8 @@ static void container_move_to_container_from_direction( struct sway_container *container, struct sway_container *destination, enum movement_direction move_dir) { if (destination->view) { - if (destination->parent == container->parent) { + if (destination->parent == container->parent && + destination->workspace == container->workspace) { wlr_log(WLR_DEBUG, "Swapping siblings"); list_t *siblings = container_get_siblings(container); int container_index = list_find(siblings, container); |