diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/wayland/output.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 4fec1955..4a8fb0bf 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -21,9 +21,10 @@ static void surface_frame_callback(void *data, struct wl_callback *cb, uint32_t time) { struct wlr_wl_backend_output *output = data; assert(output); - wlr_output_send_frame(&output->wlr_output); wl_callback_destroy(cb); output->frame_callback = NULL; + + wlr_output_send_frame(&output->wlr_output); } static struct wl_callback_listener frame_listener = { @@ -50,6 +51,11 @@ static bool wlr_wl_output_swap_buffers(struct wlr_output *wlr_output) { struct wlr_wl_backend_output *output = (struct wlr_wl_backend_output *)wlr_output; + if (output->frame_callback != NULL) { + wlr_log(L_ERROR, "Skipping buffer swap"); + return false; + } + output->frame_callback = wl_surface_frame(output->surface); wl_callback_add_listener(output->frame_callback, &frame_listener, output); |