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.
This commit is contained in:
emersion 2019-03-11 11:45:01 +01:00 committed by Brian Ashworth
parent bcde298a71
commit 076257a978
8 changed files with 61 additions and 53 deletions

View file

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