diff options
author | emersion <contact@emersion.fr> | 2019-03-11 11:45:01 +0100 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-03-11 12:43:01 -0400 |
commit | 076257a978ce5f93b9b1613e43a067e602b5b041 (patch) | |
tree | f87dcb88bee0097cbf741df180f17d06299087cf /sway/config/output.c | |
parent | bcde298a719f60b9913133dbd2a169dedbc8dd7d (diff) |
Stop using wlr_output->{lx,ly}
Also fixes sway_output->{lx,ly,width,height} not being updated. Also fixes
output_get_in_direction adding buffer coords to layout coords.
Diffstat (limited to 'sway/config/output.c')
-rw-r--r-- | sway/config/output.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 3a36ed18..1f55fd6a 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -319,6 +319,14 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) { wlr_output_layout_add_auto(root->output_layout, wlr_output); } + // Update output->{lx, ly, width, height} + struct wlr_box *output_box = + 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); + if (output->swaybg_client != NULL) { wl_client_destroy(output->swaybg_client); } |