summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-06-15 14:27:12 +0200
committerAlexander Preisinger <alexander.preisinger@gmail.com>2014-06-15 14:27:12 +0200
commitf14b45588e7804388c2e2a98cbc5e91ce21942dd (patch)
treea9720ef521a412afb0e3b06d574d68a80a34a2ae
parent8593c4f70be57dbe07497e1c70fb294c4956d197 (diff)
downloadmpv-f14b45588e7804388c2e2a98cbc5e91ce21942dd.tar.bz2
mpv-f14b45588e7804388c2e2a98cbc5e91ce21942dd.tar.xz
wayland: attach NULL surface on osd creation
When using the EGL output the subsurfaces have no buffer attached and the size seems to be infinite. Fix this by attaching a NULL buffer. Fixes #846
-rw-r--r--video/out/wayland_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 80b5ca7f29..005408751e 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -771,13 +771,16 @@ static bool create_window (struct vo_wayland_state *wl)
for (int i = 0; i < MAX_OSD_PARTS; ++i) {
wl->window.osd_surfaces[i] =
wl_compositor_create_surface(wl->display.compositor);
+ wl_surface_attach(wl->window.osd_surfaces[i], NULL, 0, 0);
wl_surface_set_input_region(wl->window.osd_surfaces[i], input);
wl->window.osd_subsurfaces[i] =
wl_subcompositor_get_subsurface(wl->display.subcomp,
wl->window.osd_surfaces[i],
wl->window.video_surface); // parent
+ wl_surface_commit(wl->window.osd_surfaces[i]);
wl_subsurface_set_sync(wl->window.osd_subsurfaces[i]);
}
+
wl_region_destroy(input);
if (!wl->window.shell_surface) {