summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context_x11.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-20 20:52:08 +0200
committerwm4 <wm4@nowhere>2016-07-20 20:52:08 +0200
commitfde784129f4b94b6fa8b2293127c41dc140b7d3a (patch)
tree423e4cfdd30f54f64de28a7e4957db7b23d764c0 /video/out/opengl/context_x11.c
parentbd9c0a10e577e7f839aabc27af6e186a9ba0cdaa (diff)
downloadmpv-fde784129f4b94b6fa8b2293127c41dc140b7d3a.tar.bz2
mpv-fde784129f4b94b6fa8b2293127c41dc140b7d3a.tar.xz
x11: stop using vo.event_fd
Instead let it do its own event loop wakeup handling.
Diffstat (limited to 'video/out/opengl/context_x11.c')
-rw-r--r--video/out/opengl/context_x11.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/video/out/opengl/context_x11.c b/video/out/opengl/context_x11.c
index 11700efdf4..48533fe701 100644
--- a/video/out/opengl/context_x11.c
+++ b/video/out/opengl/context_x11.c
@@ -308,6 +308,16 @@ static void glx_swap_buffers(struct MPGLContext *ctx)
glXSwapBuffers(ctx->vo->x11->display, ctx->vo->x11->window);
}
+static void glx_wakeup(struct MPGLContext *ctx)
+{
+ vo_x11_wakeup(ctx->vo);
+}
+
+static void glx_wait_events(struct MPGLContext *ctx, int64_t until_time_us)
+{
+ vo_x11_wait_events(ctx->vo, until_time_us);
+}
+
const struct mpgl_driver mpgl_driver_x11 = {
.name = "x11",
.priv_size = sizeof(struct glx_context),
@@ -315,6 +325,8 @@ const struct mpgl_driver mpgl_driver_x11 = {
.reconfig = glx_reconfig,
.swap_buffers = glx_swap_buffers,
.control = glx_control,
+ .wakeup = glx_wakeup,
+ .wait_events = glx_wait_events,
.uninit = glx_uninit,
};
@@ -325,5 +337,7 @@ const struct mpgl_driver mpgl_driver_x11_probe = {
.reconfig = glx_reconfig,
.swap_buffers = glx_swap_buffers,
.control = glx_control,
+ .wakeup = glx_wakeup,
+ .wait_events = glx_wait_events,
.uninit = glx_uninit,
};