diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index d572afa0..89d4337c 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -1585,6 +1585,7 @@ static struct cmd_results *cmd_output(int argc, char **argv) { | |||
1585 | output->x = output->y = output->width = output->height = -1; | 1585 | output->x = output->y = output->width = output->height = -1; |
1586 | output->name = strdup(name); | 1586 | output->name = strdup(name); |
1587 | output->enabled = -1; | 1587 | output->enabled = -1; |
1588 | output->scale = 1; | ||
1588 | 1589 | ||
1589 | // TODO: atoi doesn't handle invalid numbers | 1590 | // TODO: atoi doesn't handle invalid numbers |
1590 | 1591 | ||
@@ -1642,6 +1643,11 @@ static struct cmd_results *cmd_output(int argc, char **argv) { | |||
1642 | } | 1643 | } |
1643 | output->x = x; | 1644 | output->x = x; |
1644 | output->y = y; | 1645 | output->y = y; |
1646 | } else if (strcasecmp(command, "scale") == 0) { | ||
1647 | if (++i >= argc) { | ||
1648 | return cmd_results_new(CMD_INVALID, "output", "Missing scale parameter."); | ||
1649 | } | ||
1650 | output->scale = atoi(argv[i]); | ||
1645 | } else if (strcasecmp(command, "background") == 0 || strcasecmp(command, "bg") == 0) { | 1651 | } else if (strcasecmp(command, "background") == 0 || strcasecmp(command, "bg") == 0) { |
1646 | wordexp_t p; | 1652 | wordexp_t p; |
1647 | if (++i >= argc) { | 1653 | if (++i >= argc) { |