From 02d385e06f9ca6baccc9fdb35d4ab10532b6c22c Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 26 May 2018 21:12:10 +1000 Subject: [PATCH] Use swayc rather than wlr_output when rendering --- sway/desktop/output.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index f58c5332f..4047fa3fc 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -124,8 +124,8 @@ static void output_view_for_each_surface(struct sway_view *view, struct root_geometry *geo, wlr_surface_iterator_func_t iterator, void *user_data) { struct render_data *data = user_data; - geo->x = view->x - data->output->wlr_output->lx; - geo->y = view->y - data->output->wlr_output->ly; + geo->x = view->x - data->output->swayc->x; + geo->y = view->y - data->output->swayc->y; geo->width = view->surface->current->width; geo->height = view->surface->current->height; geo->rotation = 0; // TODO @@ -453,10 +453,9 @@ static void render_titlebar(struct sway_output *output, struct wlr_box texture_box; wlr_texture_get_size(marks_texture, &texture_box.width, &texture_box.height); - texture_box.x = - (x - output->wlr_output->lx + width - TITLEBAR_H_PADDING) + texture_box.x = (x - output->swayc->x + width - TITLEBAR_H_PADDING) * output_scale - texture_box.width; - texture_box.y = (y - output->wlr_output->ly + TITLEBAR_V_PADDING) + texture_box.y = (y - output->swayc->y + TITLEBAR_V_PADDING) * output_scale; float matrix[9]; @@ -478,9 +477,9 @@ static void render_titlebar(struct sway_output *output, struct wlr_box texture_box; wlr_texture_get_size(title_texture, &texture_box.width, &texture_box.height); - texture_box.x = (x - output->wlr_output->lx + TITLEBAR_H_PADDING) + texture_box.x = (x - output->swayc->x + TITLEBAR_H_PADDING) * output_scale; - texture_box.y = (y - output->wlr_output->ly + TITLEBAR_V_PADDING) + texture_box.y = (y - output->swayc->y + TITLEBAR_V_PADDING) * output_scale; float matrix[9];