summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/wayland_common.c7
-rw-r--r--video/out/wayland_common.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 6fade185fd..192231bb65 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1105,11 +1105,11 @@ static void frame_callback(void *data, struct wl_callback *callback, uint32_t ti
if (callback)
wl_callback_destroy(callback);
- wl->frame_callback = wl_surface_frame(wl->surface);
+ wl->frame_callback = wl_surface_frame(wl->callback_surface);
wl_callback_add_listener(wl->frame_callback, &frame_listener, wl);
if (wl->use_present) {
- struct wp_presentation_feedback *fback = wp_presentation_feedback(wl->presentation, wl->surface);
+ struct wp_presentation_feedback *fback = wp_presentation_feedback(wl->presentation, wl->callback_surface);
add_feedback(wl->fback_pool, fback);
wp_presentation_feedback_add_listener(fback, &feedback_listener, wl->fback_pool);
}
@@ -2187,7 +2187,8 @@ bool vo_wayland_init(struct vo *vo)
update_app_id(wl);
mp_make_wakeup_pipe(wl->wakeup_pipe);
- wl->frame_callback = wl_surface_frame(wl->surface);
+ wl->callback_surface = wl->using_dmabuf_wayland ? wl->video_surface : wl->surface;
+ wl->frame_callback = wl_surface_frame(wl->callback_surface);
wl_callback_add_listener(wl->frame_callback, &frame_listener, wl);
wl_surface_commit(wl->surface);
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h
index 06d742e5ed..c9921cc60b 100644
--- a/video/out/wayland_common.h
+++ b/video/out/wayland_common.h
@@ -50,6 +50,7 @@ struct vo_wayland_state {
struct wl_shm *shm;
struct wl_surface *surface;
struct wl_surface *video_surface;
+ struct wl_surface *callback_surface;
struct wl_subsurface *video_subsurface;
/* Geometry */