From 3aa2349beb28fc72d7124806e91ed9481221460f Mon Sep 17 00:00:00 2001 From: Chengyu Zheng Date: Mon, 23 Apr 2018 19:17:33 +0200 Subject: [PATCH] remove output pos syntax fix --- sway/commands.c | 2 +- sway/commands/output.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/sway/commands.c b/sway/commands.c index 6af3c5d0c..f75c21f0c 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -322,7 +322,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) { cmdlist += strspn(cmdlist, whitespace); do { // Split commands - cmd = argsep(&cmdlist, ","); + cmd = argsep(&cmdlist, ";"); cmd += strspn(cmd, whitespace); if (strcmp(cmd, "") == 0) { wlr_log(L_INFO, "Ignoring empty command."); diff --git a/sway/commands/output.c b/sway/commands/output.c index 74728a9c9..f0466aa30 100644 --- a/sway/commands/output.c +++ b/sway/commands/output.c @@ -73,15 +73,17 @@ static struct cmd_results *cmd_output_position(struct output_config *output, char *end; output->x = strtol(argv[*i], &end, 10); - // Format is 1234 4321 - if (++*i >= argc) { - return cmd_results_new(CMD_INVALID, "output", - "Missing position argument (y)."); - } - output->y = strtol(argv[*i], &end, 10); if (*end) { - return cmd_results_new(CMD_INVALID, "output", - "Invalid position y."); + // Format is 1234 4321 + if (++*i >= argc) { + return cmd_results_new(CMD_INVALID, "output", + "Missing position argument (y)."); + } + output->y = strtol(argv[*i], &end, 10); + if (*end) { + return cmd_results_new(CMD_INVALID, "output", + "Invalid position y."); + } } return NULL;