summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-03-10 14:59:12 +0100
committerAlexander Preisinger <alexander.preisinger@gmail.com>2014-04-16 16:38:54 +0200
commit49cbc174c1e5ef4240e56fbc5665ef9909fa5d4f (patch)
treeb76cdcff4da6db68746c8558710493f7d2ce6cb2 /video
parent5528ad3031148ce19583ad8cd3c949fa4df4eb54 (diff)
downloadmpv-49cbc174c1e5ef4240e56fbc5665ef9909fa5d4f.tar.bz2
mpv-49cbc174c1e5ef4240e56fbc5665ef9909fa5d4f.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/wayland_common.c4
1 files changed, 4 insertions, 0 deletions
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");