From 076257a978ce5f93b9b1613e43a067e602b5b041 Mon Sep 17 00:00:00 2001 From: emersion Date: Mon, 11 Mar 2019 11:45:01 +0100 Subject: 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. --- sway/desktop/desktop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sway/desktop/desktop.c') diff --git a/sway/desktop/desktop.c b/sway/desktop/desktop.c index d8dd0240..ec45d80a 100644 --- a/sway/desktop/desktop.c +++ b/sway/desktop/desktop.c @@ -6,8 +6,10 @@ void desktop_damage_surface(struct wlr_surface *surface, double lx, double ly, bool whole) { for (int i = 0; i < root->outputs->length; ++i) { struct sway_output *output = root->outputs->items[i]; - output_damage_surface(output, lx - output->wlr_output->lx, - ly - output->wlr_output->ly, surface, whole); + struct wlr_box *output_box = wlr_output_layout_get_box( + root->output_layout, output->wlr_output); + output_damage_surface(output, lx - output_box->x, + ly - output_box->y, surface, whole); } } -- cgit v1.2.3-54-g00ecf