aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-29 21:13:22 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-29 21:13:22 +1000
commit3a6ed5110c76ef5bed8cc4c26a97759f6201eaac (patch)
treea24798e2e0954daef195806b01938ec8a8bbcaed /sway/desktop/output.c
parentMerge remote-tracking branch 'upstream/master' into atomic (diff)
downloadsway-3a6ed5110c76ef5bed8cc4c26a97759f6201eaac.tar.gz
sway-3a6ed5110c76ef5bed8cc4c26a97759f6201eaac.tar.zst
sway-3a6ed5110c76ef5bed8cc4c26a97759f6201eaac.zip
Render saved buffers with the surface's dimensions
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 69d0bdd4..b55a3962 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -354,15 +354,17 @@ static void render_saved_view(struct sway_view *view,
354 struct sway_output *output, pixman_region32_t *damage, float alpha) { 354 struct sway_output *output, pixman_region32_t *damage, float alpha) {
355 struct wlr_output *wlr_output = output->wlr_output; 355 struct wlr_output *wlr_output = output->wlr_output;
356 356
357 struct wlr_texture *texture = transaction_get_texture(view); 357 int width, height;
358 struct wlr_texture *texture =
359 transaction_get_saved_texture(view, &width, &height);
358 if (!texture) { 360 if (!texture) {
359 return; 361 return;
360 } 362 }
361 struct wlr_box box = { 363 struct wlr_box box = {
362 .x = view->swayc->current.view_x - output->swayc->current.swayc_x, 364 .x = view->swayc->current.view_x - output->swayc->current.swayc_x,
363 .y = view->swayc->current.view_y - output->swayc->current.swayc_y, 365 .y = view->swayc->current.view_y - output->swayc->current.swayc_y,
364 .width = view->swayc->current.view_width, 366 .width = width,
365 .height = view->swayc->current.view_height, 367 .height = height,
366 }; 368 };
367 369
368 struct wlr_box output_box = { 370 struct wlr_box output_box = {