summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context_wayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/context_wayland.c')
-rw-r--r--video/out/opengl/context_wayland.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c
index e74132bcf2..b1d9a32bca 100644
--- a/video/out/opengl/context_wayland.c
+++ b/video/out/opengl/context_wayland.c
@@ -207,8 +207,7 @@ static void waylandgl_swap_buffers(MPGLContext *ctx)
if (!wl->frame.callback)
vo_wayland_request_frame(ctx->vo, NULL, NULL);
- if (!vo_wayland_wait_frame(ctx->vo))
- MP_DBG(wl, "discarding frame callback\n");
+ vo_wayland_wait_events(ctx->vo, 0);
eglSwapBuffers(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);
}
@@ -225,6 +224,16 @@ static int waylandgl_control(MPGLContext *ctx, int *events, int request,
return r;
}
+static void wayland_wakeup(struct MPGLContext *ctx)
+{
+ vo_wayland_wakeup(ctx->vo);
+}
+
+static void wayland_wait_events(struct MPGLContext *ctx, int64_t until_time_us)
+{
+ vo_wayland_wait_events(ctx->vo, until_time_us);
+}
+
static int waylandgl_init(struct MPGLContext *ctx, int flags)
{
if (!vo_wayland_init(ctx->vo))
@@ -239,5 +248,7 @@ const struct mpgl_driver mpgl_driver_wayland = {
.reconfig = waylandgl_reconfig,
.swap_buffers = waylandgl_swap_buffers,
.control = waylandgl_control,
+ .wakeup = wayland_wakeup,
+ .wait_events = wayland_wait_events,
.uninit = waylandgl_uninit,
};