diff options
author | 2020-03-09 18:09:47 +0100 | |
---|---|---|
committer | 2020-04-02 23:23:56 +0200 | |
commit | 3a5d9b3b32a3091e8a84784f95b40aa299f1ba8f (patch) | |
tree | eadc6e42cee5f6055ff04aceaf7d3d0227ad1d8a | |
parent | change apply_exclusive() to closer match layer shell protocol (diff) | |
download | sway-3a5d9b3b32a3091e8a84784f95b40aa299f1ba8f.tar.gz sway-3a5d9b3b32a3091e8a84784f95b40aa299f1ba8f.tar.zst sway-3a5d9b3b32a3091e8a84784f95b40aa299f1ba8f.zip |
Update for new wlr_buffer API
Update for [1].
[1]: https://github.com/swaywm/wlroots/pull/2044
-rw-r--r-- | sway/tree/view.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index da8822c3..de1e936a 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -1154,7 +1154,7 @@ void view_remove_saved_buffer(struct sway_view *view) { | |||
1154 | if (!sway_assert(view->saved_buffer, "Expected a saved buffer")) { | 1154 | if (!sway_assert(view->saved_buffer, "Expected a saved buffer")) { |
1155 | return; | 1155 | return; |
1156 | } | 1156 | } |
1157 | wlr_buffer_unref(&view->saved_buffer->base); | 1157 | wlr_buffer_unlock(&view->saved_buffer->base); |
1158 | view->saved_buffer = NULL; | 1158 | view->saved_buffer = NULL; |
1159 | } | 1159 | } |
1160 | 1160 | ||
@@ -1163,7 +1163,7 @@ void view_save_buffer(struct sway_view *view) { | |||
1163 | view_remove_saved_buffer(view); | 1163 | view_remove_saved_buffer(view); |
1164 | } | 1164 | } |
1165 | if (view->surface && wlr_surface_has_buffer(view->surface)) { | 1165 | if (view->surface && wlr_surface_has_buffer(view->surface)) { |
1166 | wlr_buffer_ref(&view->surface->buffer->base); | 1166 | wlr_buffer_lock(&view->surface->buffer->base); |
1167 | view->saved_buffer = view->surface->buffer; | 1167 | view->saved_buffer = view->surface->buffer; |
1168 | view->saved_buffer_width = view->surface->current.width; | 1168 | view->saved_buffer_width = view->surface->current.width; |
1169 | view->saved_buffer_height = view->surface->current.height; | 1169 | view->saved_buffer_height = view->surface->current.height; |