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 | |
parent | Use surface size if xdg shell's geometry isn't set (diff) | |
download | sway-02d385e06f9ca6baccc9fdb35d4ab10532b6c22c.tar.gz sway-02d385e06f9ca6baccc9fdb35d4ab10532b6c22c.tar.zst sway-02d385e06f9ca6baccc9fdb35d4ab10532b6c22c.zip |
Use swayc rather than wlr_output when rendering
-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, | |||
124 | struct root_geometry *geo, wlr_surface_iterator_func_t iterator, | 124 | struct root_geometry *geo, wlr_surface_iterator_func_t iterator, |
125 | void *user_data) { | 125 | void *user_data) { |
126 | struct render_data *data = user_data; | 126 | struct render_data *data = user_data; |
127 | geo->x = view->x - data->output->wlr_output->lx; | 127 | geo->x = view->x - data->output->swayc->x; |
128 | geo->y = view->y - data->output->wlr_output->ly; | 128 | geo->y = view->y - data->output->swayc->y; |
129 | geo->width = view->surface->current->width; | 129 | geo->width = view->surface->current->width; |
130 | geo->height = view->surface->current->height; | 130 | geo->height = view->surface->current->height; |
131 | geo->rotation = 0; // TODO | 131 | geo->rotation = 0; // TODO |
@@ -453,10 +453,9 @@ static void render_titlebar(struct sway_output *output, | |||
453 | struct wlr_box texture_box; | 453 | struct wlr_box texture_box; |
454 | wlr_texture_get_size(marks_texture, | 454 | wlr_texture_get_size(marks_texture, |
455 | &texture_box.width, &texture_box.height); | 455 | &texture_box.width, &texture_box.height); |
456 | texture_box.x = | 456 | texture_box.x = (x - output->swayc->x + width - TITLEBAR_H_PADDING) |
457 | (x - output->wlr_output->lx + width - TITLEBAR_H_PADDING) | ||
458 | * output_scale - texture_box.width; | 457 | * output_scale - texture_box.width; |
459 | texture_box.y = (y - output->wlr_output->ly + TITLEBAR_V_PADDING) | 458 | texture_box.y = (y - output->swayc->y + TITLEBAR_V_PADDING) |
460 | * output_scale; | 459 | * output_scale; |
461 | 460 | ||
462 | float matrix[9]; | 461 | float matrix[9]; |
@@ -478,9 +477,9 @@ static void render_titlebar(struct sway_output *output, | |||
478 | struct wlr_box texture_box; | 477 | struct wlr_box texture_box; |
479 | wlr_texture_get_size(title_texture, | 478 | wlr_texture_get_size(title_texture, |
480 | &texture_box.width, &texture_box.height); | 479 | &texture_box.width, &texture_box.height); |
481 | texture_box.x = (x - output->wlr_output->lx + TITLEBAR_H_PADDING) | 480 | texture_box.x = (x - output->swayc->x + TITLEBAR_H_PADDING) |
482 | * output_scale; | 481 | * output_scale; |
483 | texture_box.y = (y - output->wlr_output->ly + TITLEBAR_V_PADDING) | 482 | texture_box.y = (y - output->swayc->y + TITLEBAR_V_PADDING) |
484 | * output_scale; | 483 | * output_scale; |
485 | 484 | ||
486 | float matrix[9]; | 485 | float matrix[9]; |