aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/wayland/output.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index 967011e8..89b1a965 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -200,6 +200,14 @@ static bool output_commit(struct wlr_output *wlr_output) {
damage = &wlr_output->pending.damage;
}
+ if (output->frame_callback != NULL) {
+ wlr_log(WLR_ERROR, "Skipping buffer swap");
+ return false;
+ }
+
+ output->frame_callback = wl_surface_frame(output->surface);
+ wl_callback_add_listener(output->frame_callback, &frame_listener, output);
+
switch (wlr_output->pending.buffer_type) {
case WLR_OUTPUT_STATE_BUFFER_RENDER:
if (!wlr_egl_swap_buffers(&output->backend->egl,