diff options
author | emersion <contact@emersion.fr> | 2018-10-01 11:07:58 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-10-04 21:56:38 +0200 |
commit | 26b9d6dbb1f060405c02b6b66527b0272f79d495 (patch) | |
tree | eafc3eaae5736ed8ae325f51c12a1fb60b70a94f /backend/wayland | |
parent | 78389fe72225f9baf7def744825323f54ac4ee8e (diff) |
output: send present event from all backends
Diffstat (limited to 'backend/wayland')
-rw-r--r-- | backend/wayland/output.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 4eb99a3b..4fbfe9d2 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -66,8 +66,14 @@ static bool output_swap_buffers(struct wlr_output *wlr_output, output->frame_callback = wl_surface_frame(output->surface); wl_callback_add_listener(output->frame_callback, &frame_listener, output); - return wlr_egl_swap_buffers(&output->backend->egl, output->egl_surface, - damage); + if (!wlr_egl_swap_buffers(&output->backend->egl, + output->egl_surface, damage)) { + return false; + } + + // TODO: if available, use the presentation-time protocol + wlr_output_send_present(wlr_output, NULL, 0, 0); + return true; } static void output_transform(struct wlr_output *wlr_output, |