mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
5528ad3031
commit
49cbc174c1
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue