summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-02 15:41:03 -0500
committerDudemanguy <random342@airmail.cc>2023-10-02 15:58:03 -0500
commit47dec1c7c280cc36dbb402e1a13e95ddf619482e (patch)
tree63c19e9e364b85e2c53e4cb45682228b0189fe0c /video/out/wayland_common.c
parent05d79298b8f33f903071d0f173c28c719f9c5315 (diff)
downloadmpv-47dec1c7c280cc36dbb402e1a13e95ddf619482e.tar.bz2
mpv-47dec1c7c280cc36dbb402e1a13e95ddf619482e.tar.xz
vo_dmabuf_wayland: attach solid buffer when using force window
e125da2096d97ec7e64701bf6289705a24c31729 changed the z order of the surfaces a bit, but it turns out this has a side effect. If the aspect ratio of the actual video doesn't match your display, the osd surface doesn't scale properly and gets clipped. Put the z ordering back where it used to be. Instead when we have the force window case, simply attach the already existing solid buffer to the video surface. This allows the osd surface to actually draw over it instead of always being obscured so it satisfies the case of not having any real video frames but still wanting to draw the osd. Also don't mess with any of the viewport source setting stuff with force window. Weston complains about it, and it's nonsensical anyway. Fixes #12547.
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r--video/out/wayland_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index b23c999a9d..47dc4d9605 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