diff options
-rw-r--r-- | sway/commands/default_border.c | 8 | ||||
-rw-r--r-- | sway/commands/move.c | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/sway/commands/default_border.c b/sway/commands/default_border.c index fcd2c075..2e356d3d 100644 --- a/sway/commands/default_border.c +++ b/sway/commands/default_border.c @@ -15,12 +15,12 @@ struct cmd_results *cmd_default_border(int argc, char **argv) { config->border = B_NORMAL; } else if (strcmp(argv[0], "pixel") == 0) { config->border = B_PIXEL; - if (argc == 2) { - config->border_thickness = atoi(argv[1]); - } } else { return cmd_results_new(CMD_INVALID, "default_border", - "Expected 'default_border <none|normal|pixel>' or 'default_border pixel <px>'"); + "Expected 'default_border <none|normal|pixel>' or 'default_border <normal|pixel> <px>'"); + } + if (argc == 2) { + config->border_thickness = atoi(argv[1]); } return cmd_results_new(CMD_SUCCESS, NULL, NULL); diff --git a/sway/commands/move.c b/sway/commands/move.c index a5273ba4..890b1a8c 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -90,12 +90,14 @@ static struct cmd_results *cmd_move_container(struct sway_container *current, } free(ws_name); struct sway_container *old_parent = current->parent; - struct sway_container *focus = seat_get_focus_inactive( + struct sway_container *destination = seat_get_focus_inactive( config->handler_context.seat, ws); - container_move_to(current, focus); - seat_set_focus(config->handler_context.seat, old_parent); + container_move_to(current, destination); + struct sway_container *focus = seat_get_focus_inactive( + config->handler_context.seat, old_parent); + seat_set_focus(config->handler_context.seat, focus); container_reap_empty(old_parent); - container_reap_empty(focus->parent); + container_reap_empty(destination->parent); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } else if (strcasecmp(argv[1], "to") == 0 && strcasecmp(argv[2], "output") == 0) { |