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
This commit is contained in:
Brian Ashworth 2019-07-10 13:53:27 -04:00 committed by Drew DeVault
parent 32265d9136
commit 6096d31eed
1 changed files with 2 additions and 3 deletions

View File

@ -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");