aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-07-29 07:35:43 -0400
committerDrew DeVault <sir@cmpwn.com>2016-07-29 07:35:43 -0400
commit966127222439620233c27ab835062f6cc69e23ea (patch)
tree7e233c68e7063b7c0c7857a73111e95141fb5b44 /sway/commands.c
parentddb44984c5f3aede3eea45403659e5614a7b752f (diff)
parentcad085ed9ddf57ade3785cabfaea9fb49613d4a3 (diff)
Merge remote-tracking branch 'origin/hidpi'
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c
index d572afa0..053b5792 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) {
@@ -1700,10 +1706,10 @@ static struct cmd_results *cmd_output(int argc, char **argv) {
list_add(config->output_configs, output);
}
- sway_log(L_DEBUG, "Config stored for output %s (enabled:%d) (%d x %d @ %d, %d) (bg %s %s)",
+ sway_log(L_DEBUG, "Config stored for output %s (enabled:%d) (%d x %d @ %d, %d scale %d) (bg %s %s)",
output->name, output->enabled, output->width,
- output->height, output->x, output->y, output->background,
- output->background_option);
+ output->height, output->x, output->y, output->scale,
+ output->background, output->background_option);
if (output->name) {
// Try to find the output container and apply configuration now. If