diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-07-10 13:53:27 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-07-10 14:03:15 -0400 |
commit | 6096d31eed4f066b6e2bc51122f5a1b47afd93f7 (patch) | |
tree | 83645654d9939241b3cdd72f148568c364a22e94 /sway | |
parent | input/libinput: only reset supported options (diff) | |
download | sway-6096d31eed4f066b6e2bc51122f5a1b47afd93f7.tar.gz sway-6096d31eed4f066b6e2bc51122f5a1b47afd93f7.tar.zst sway-6096d31eed4f066b6e2bc51122f5a1b47afd93f7.zip |
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
Diffstat (limited to 'sway')
-rw-r--r-- | sway/config/output.c | 5 |
1 files changed, 2 insertions, 3 deletions
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) { | |||
308 | wlr_output_layout_get_box(root->output_layout, wlr_output); | 308 | wlr_output_layout_get_box(root->output_layout, wlr_output); |
309 | output->lx = output_box->x; | 309 | output->lx = output_box->x; |
310 | output->ly = output_box->y; | 310 | output->ly = output_box->y; |
311 | wlr_output_transformed_resolution(wlr_output, | 311 | output->width = output_box->width; |
312 | &output->width, &output->height); | 312 | output->height = output_box->height; |
313 | |||
314 | 313 | ||
315 | if (oc && oc->dpms_state == DPMS_OFF) { | 314 | if (oc && oc->dpms_state == DPMS_OFF) { |
316 | sway_log(SWAY_DEBUG, "Turning off screen"); | 315 | sway_log(SWAY_DEBUG, "Turning off screen"); |