diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index 5c894dcd7e38f..8290bad2632a4 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -489,6 +489,9 @@ static void set_viewport_source(struct vo *vo, struct mp_rect src) struct priv *p = vo->priv; struct vo_wayland_state *wl = vo->wl; + if (p->force_window) + return; + if (wl->video_viewport && !mp_rect_equals(&p->src, &src)) { wp_viewport_set_source(wl->video_viewport, src.x0 << 8, src.y0 << 8, mp_rect_w(src) << 8, @@ -587,12 +590,18 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) struct osd_buffer *osd_buf; double pts; - if (!vo_wayland_check_visible(vo) && !p->force_window) + if (!vo_wayland_check_visible(vo)) return; if (p->destroy_buffers) destroy_buffers(vo); + // Reuse the solid buffer so the osd can be visible + if (p->force_window) { + wl_surface_attach(wl->video_surface, p->solid_buffer, 0, 0); + wl_surface_damage_buffer(wl->video_surface, 0, 0, 1, 1); + } + pts = frame->current ? frame->current->pts : 0; if (frame->current) { struct mp_image *src = mp_image_new_ref(frame->current); diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index b23c999a9dc55..47dc4d9605c4c 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -2239,8 +2239,8 @@ bool vo_wayland_init(struct vo *vo) goto err; if (wl->subcompositor) { + wl->osd_subsurface = wl_subcompositor_get_subsurface(wl->subcompositor, wl->osd_surface, wl->video_surface); wl->video_subsurface = wl_subcompositor_get_subsurface(wl->subcompositor, wl->video_surface, wl->surface); - wl->osd_subsurface = wl_subcompositor_get_subsurface(wl->subcompositor, wl->osd_surface, wl->surface); } #if HAVE_WAYLAND_PROTOCOLS_1_27