summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sway/config.h2
-rw-r--r--sway/commands/output.c4
-rw-r--r--sway/config/output.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 139d7800..afff2738 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -82,7 +82,7 @@ struct output_config {
82 int width, height; 82 int width, height;
83 float refresh_rate; 83 float refresh_rate;
84 int x, y; 84 int x, y;
85 int scale; 85 float scale;
86 int32_t transform; 86 int32_t transform;
87 87
88 char *background; 88 char *background;
diff --git a/sway/commands/output.c b/sway/commands/output.c
index d71e4d8d..7988e3e4 100644
--- a/sway/commands/output.c
+++ b/sway/commands/output.c
@@ -144,7 +144,7 @@ struct cmd_results *cmd_output(int argc, char **argv) {
144 goto fail; 144 goto fail;
145 } 145 }
146 char *end; 146 char *end;
147 output->scale = strtol(argv[i], &end, 10); 147 output->scale = strtof(argv[i], &end);
148 if (*end) { 148 if (*end) {
149 error = cmd_results_new(CMD_INVALID, "output", 149 error = cmd_results_new(CMD_INVALID, "output",
150 "Invalid scale."); 150 "Invalid scale.");
@@ -278,7 +278,7 @@ struct cmd_results *cmd_output(int argc, char **argv) {
278 } 278 }
279 279
280 sway_log(L_DEBUG, "Config stored for output %s (enabled: %d) (%dx%d@%fHz " 280 sway_log(L_DEBUG, "Config stored for output %s (enabled: %d) (%dx%d@%fHz "
281 "position %d,%d scale %d transform %d) (bg %s %s)", 281 "position %d,%d scale %f transform %d) (bg %s %s)",
282 output->name, output->enabled, output->width, output->height, 282 output->name, output->enabled, output->width, output->height,
283 output->refresh_rate, output->x, output->y, output->scale, 283 output->refresh_rate, output->x, output->y, output->scale,
284 output->transform, output->background, output->background_option); 284 output->transform, output->background, output->background_option);
diff --git a/sway/config/output.c b/sway/config/output.c
index dc9ee37c..ff3f73a3 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -111,7 +111,7 @@ void apply_output_config(struct output_config *oc, swayc_t *output) {
111 set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate); 111 set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate);
112 } 112 }
113 if (oc && oc->scale > 0) { 113 if (oc && oc->scale > 0) {
114 sway_log(L_DEBUG, "Set %s scale to %d", oc->name, oc->scale); 114 sway_log(L_DEBUG, "Set %s scale to %f", oc->name, oc->scale);
115 wlr_output_set_scale(wlr_output, oc->scale); 115 wlr_output_set_scale(wlr_output, oc->scale);
116 } 116 }
117 if (oc && oc->transform >= 0) { 117 if (oc && oc->transform >= 0) {