diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-26 21:12:10 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-01 23:14:58 +1000 |
commit | 02d385e06f9ca6baccc9fdb35d4ab10532b6c22c (patch) | |
tree | c19e597730d85d81083c93a4ea44f0f6b6559dfb /sway/desktop | |
parent | 3b1db30a5e5758ec099b79250681cbf4be5ae0e9 (diff) |
Use swayc rather than wlr_output when rendering
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index f58c5332..4047fa3f 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]; |