diff options
author | Simon Ser <contact@emersion.fr> | 2020-01-02 20:39:41 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-01-02 12:44:28 -0700 |
commit | 5bbb44482b4127f022ece500060a1d1d6240407f (patch) | |
tree | c463c3c184544656355271a59b9aaed17368f372 | |
parent | 1c5ca793c05df28c0f9dfa6c8de97bb3877afe5b (diff) |
backend/wayland: fix frame callback not registered
This got removed in [1]. I probably messed up the rebase.
[1]: https://github.com/swaywm/wlroots/pull/1797/files#diff-3065f86e6de87d143d4a7673a8ee3a2d
Fixes: 5d1ba0f44687 ("output: re-introduce atomic mode, enabled, scale and transform")
-rw-r--r-- | backend/wayland/output.c | 8 |
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, |