mirror of
https://github.com/swaywm/sway.git
synced 2024-11-16 05:03:17 +00:00
Use wlr_client_buffer
Update for breaking changes in [1]. [1]: https://github.com/swaywm/wlroots/pull/2043
This commit is contained in:
parent
241684eb1d
commit
9d0aa0cb83
|
@ -80,7 +80,7 @@ struct sway_view {
|
||||||
bool allow_request_urgent;
|
bool allow_request_urgent;
|
||||||
struct wl_event_source *urgent_timer;
|
struct wl_event_source *urgent_timer;
|
||||||
|
|
||||||
struct wlr_buffer *saved_buffer;
|
struct wlr_client_buffer *saved_buffer;
|
||||||
int saved_buffer_width, saved_buffer_height;
|
int saved_buffer_width, saved_buffer_height;
|
||||||
|
|
||||||
// The geometry for whatever the client is committing, regardless of
|
// The geometry for whatever the client is committing, regardless of
|
||||||
|
|
|
@ -501,7 +501,7 @@ static bool scan_out_fullscreen_view(struct sway_output *output,
|
||||||
wlr_presentation_surface_sampled_on_output(server.presentation, surface,
|
wlr_presentation_surface_sampled_on_output(server.presentation, surface,
|
||||||
wlr_output);
|
wlr_output);
|
||||||
|
|
||||||
if (!wlr_output_attach_buffer(wlr_output, surface->buffer)) {
|
if (!wlr_output_attach_buffer(wlr_output, &surface->buffer->base)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return wlr_output_commit(wlr_output);
|
return wlr_output_commit(wlr_output);
|
||||||
|
|
|
@ -1154,7 +1154,7 @@ void view_remove_saved_buffer(struct sway_view *view) {
|
||||||
if (!sway_assert(view->saved_buffer, "Expected a saved buffer")) {
|
if (!sway_assert(view->saved_buffer, "Expected a saved buffer")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wlr_buffer_unref(view->saved_buffer);
|
wlr_buffer_unref(&view->saved_buffer->base);
|
||||||
view->saved_buffer = NULL;
|
view->saved_buffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1163,7 +1163,8 @@ void view_save_buffer(struct sway_view *view) {
|
||||||
view_remove_saved_buffer(view);
|
view_remove_saved_buffer(view);
|
||||||
}
|
}
|
||||||
if (view->surface && wlr_surface_has_buffer(view->surface)) {
|
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_width = view->surface->current.width;
|
||||||
view->saved_buffer_height = view->surface->current.height;
|
view->saved_buffer_height = view->surface->current.height;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue