aboutsummaryrefslogtreecommitdiff
path: root/sway/config
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-07-10 13:53:27 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-10 14:03:15 -0400
commit6096d31eed4f066b6e2bc51122f5a1b47afd93f7 (patch)
tree83645654d9939241b3cdd72f148568c364a22e94 /sway/config
parent32265d913653c81e54e8e17d4511aab9d4dfc73a (diff)
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/config')
-rw-r--r--sway/config/output.c5
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) {
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");