From 49cbc174c1e5ef4240e56fbc5665ef9909fa5d4f Mon Sep 17 00:00:00 2001 From: Alexander Preisinger Date: Mon, 10 Mar 2014 14:59:12 +0100 Subject: wayland: unset input regions for osd Set a zero sized input region for the osd surfaces in order to avoid getting input for the subsurfaces which might dissapear any time. --- video/out/wayland_common.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'video/out/wayland_common.c') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 3d803ffb42..fa34efb949 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -807,15 +807,19 @@ static bool create_window (struct vo_wayland_state *wl) // 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_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_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"); -- cgit v1.2.3