aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <ddevault@linode.com>2016-07-16 10:04:18 -0400
committerLibravatar Drew DeVault <ddevault@linode.com>2016-07-28 14:36:49 -0400
commit6ea02f3064736b7f53e5b28c16ee74f5665ce1b8 (patch)
treecc3c1ac31dd51ec82167f171dfe306ed246ef22f /sway/commands.c
parentMerge pull request #796 from Hummer12007/ipc_sub (diff)
downloadsway-6ea02f3064736b7f53e5b28c16ee74f5665ce1b8.tar.gz
sway-6ea02f3064736b7f53e5b28c16ee74f5665ce1b8.tar.zst
sway-6ea02f3064736b7f53e5b28c16ee74f5665ce1b8.zip
Initial pass on HiDPI support
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c6
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) {