From 6096d31eed4f066b6e2bc51122f5a1b47afd93f7 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Wed, 10 Jul 2019 13:53:27 -0400 Subject: config/output: correctly set width/height in apply In apply_output_config, this sets output->{width,height} using the values in the output box. Previously, they were being set using wlr_output_transformed_resolution, which takes the width and height from the wlr_output and just checks whether they should be swapped based on the transform. This did not take into account the output's scale. wlr_output_effective_resolution could be used instead, which handles both transform and scale. However, the values in the output box have already been processed by wlr_output_effective_resolution so they can just be used directly --- sway/config/output.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sway/config') diff --git a/sway/config/output.c b/sway/config/output.c index f8e78fd1..84b7c7e2 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -308,9 +308,8 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { wlr_output_layout_get_box(root->output_layout, wlr_output); output->lx = output_box->x; output->ly = output_box->y; - wlr_output_transformed_resolution(wlr_output, - &output->width, &output->height); - + output->width = output_box->width; + output->height = output_box->height; if (oc && oc->dpms_state == DPMS_OFF) { sway_log(SWAY_DEBUG, "Turning off screen"); -- cgit v1.2.3