Render saved buffers with the surface's dimensions

This commit is contained in:
Ryan Dwyer 2018-06-29 21:13:22 +10:00
parent a2fbb20a61
commit 3a6ed5110c
3 changed files with 25 additions and 13 deletions

View file

@ -354,15 +354,17 @@ static void render_saved_view(struct sway_view *view,
struct sway_output *output, pixman_region32_t *damage, float alpha) {
struct wlr_output *wlr_output = output->wlr_output;
struct wlr_texture *texture = transaction_get_texture(view);
int width, height;
struct wlr_texture *texture =
transaction_get_saved_texture(view, &width, &height);
if (!texture) {
return;
}
struct wlr_box box = {
.x = view->swayc->current.view_x - output->swayc->current.swayc_x,
.y = view->swayc->current.view_y - output->swayc->current.swayc_y,
.width = view->swayc->current.view_width,
.height = view->swayc->current.view_height,
.width = width,
.height = height,
};
struct wlr_box output_box = {