diff options
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r-- | video/out/wayland_common.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 005408751e..fe6142c89a 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -744,6 +744,9 @@ static void destroy_display (struct vo_wayland_state *wl) if (wl->display.shell) wl_shell_destroy(wl->display.shell); + if (wl->display.subcomp) + wl_subcompositor_destroy(wl->display.subcomp); + if (wl->display.compositor) wl_compositor_destroy(wl->display.compositor); @@ -763,26 +766,6 @@ static bool create_window (struct vo_wayland_state *wl) wl->window.shell_surface = wl_shell_get_shell_surface(wl->display.shell, wl->window.video_surface); - // Commits on surfaces bound to a subsurface are cached until the parent - // surface is commited, in this case the video surface. - // Which means we can call commit anywhere. - struct wl_region *input = - wl_compositor_create_region(wl->display.compositor); - 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) { MP_ERR(wl, "creating shell surface failed\n"); return false; |