diff options
author | Drew DeVault <[email protected]> | 2016-07-16 10:04:18 -0400 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2016-07-28 14:36:49 -0400 |
commit | 6ea02f3064736b7f53e5b28c16ee74f5665ce1b8 (patch) | |
tree | cc3c1ac31dd51ec82167f171dfe306ed246ef22f /sway/commands.c | |
parent | a5af3bce986d2bd25721f865c0c3dd37ff703eed (diff) |
Initial pass on HiDPI support
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) { output->x = output->y = output->width = output->height = -1; output->name = strdup(name); output->enabled = -1; + output->scale = 1; // TODO: atoi doesn't handle invalid numbers @@ -1642,6 +1643,11 @@ static struct cmd_results *cmd_output(int argc, char **argv) { } output->x = x; output->y = y; + } else if (strcasecmp(command, "scale") == 0) { + if (++i >= argc) { + return cmd_results_new(CMD_INVALID, "output", "Missing scale parameter."); + } + output->scale = atoi(argv[i]); } else if (strcasecmp(command, "background") == 0 || strcasecmp(command, "bg") == 0) { wordexp_t p; if (++i >= argc) { |