mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
waylandsink: Don't create throwaway empty regions
Instead of creating a region, adding nothing to it, setting that as the input region and destroying the region, you can instead just pass NULL to wl_surface_set_input_region for the same effect. Fixes #702
This commit is contained in:
parent
2a1176973a
commit
68fa80e831
1 changed files with 2 additions and 8 deletions
|
@ -114,7 +114,6 @@ static GstWlWindow *
|
|||
gst_wl_window_new_internal (GstWlDisplay * display, GMutex * render_lock)
|
||||
{
|
||||
GstWlWindow *window;
|
||||
struct wl_region *region;
|
||||
|
||||
window = g_object_new (GST_TYPE_WL_WINDOW, NULL);
|
||||
window->display = g_object_ref (display);
|
||||
|
@ -146,13 +145,8 @@ gst_wl_window_new_internal (GstWlDisplay * display, GMutex * render_lock)
|
|||
}
|
||||
|
||||
/* do not accept input */
|
||||
region = wl_compositor_create_region (display->compositor);
|
||||
wl_surface_set_input_region (window->area_surface, region);
|
||||
wl_region_destroy (region);
|
||||
|
||||
region = wl_compositor_create_region (display->compositor);
|
||||
wl_surface_set_input_region (window->video_surface, region);
|
||||
wl_region_destroy (region);
|
||||
wl_surface_set_input_region (window->area_surface, NULL);
|
||||
wl_surface_set_input_region (window->video_surface, NULL);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue