diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/desktop/output.c | 2 | ||||
-rw-r--r-- | sway/tree/view.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index b78e0819..ec3d6424 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -501,7 +501,7 @@ static bool scan_out_fullscreen_view(struct sway_output *output, wlr_presentation_surface_sampled_on_output(server.presentation, surface, wlr_output); - if (!wlr_output_attach_buffer(wlr_output, surface->buffer)) { + if (!wlr_output_attach_buffer(wlr_output, &surface->buffer->base)) { return false; } return wlr_output_commit(wlr_output); diff --git a/sway/tree/view.c b/sway/tree/view.c index 04ff4b57..da8822c3 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -1154,7 +1154,7 @@ void view_remove_saved_buffer(struct sway_view *view) { if (!sway_assert(view->saved_buffer, "Expected a saved buffer")) { return; } - wlr_buffer_unref(view->saved_buffer); + wlr_buffer_unref(&view->saved_buffer->base); view->saved_buffer = NULL; } @@ -1163,7 +1163,8 @@ void view_save_buffer(struct sway_view *view) { view_remove_saved_buffer(view); } if (view->surface && wlr_surface_has_buffer(view->surface)) { - view->saved_buffer = wlr_buffer_ref(view->surface->buffer); + wlr_buffer_ref(&view->surface->buffer->base); + view->saved_buffer = view->surface->buffer; view->saved_buffer_width = view->surface->current.width; view->saved_buffer_height = view->surface->current.height; } |