diff options
author | Daniel Stone <daniels@collabora.com> | 2018-05-09 13:16:15 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-02 10:52:12 +0100 |
commit | d61a8323de474972a22ebf43db021036fc5d8df7 (patch) | |
tree | d574e99968bee785ce07e695daccacf515488858 | |
parent | c262bc93d6ea2857aa35e13309890dd26814055d (diff) | |
download | gstreamer-plugins-bad-d61a8323de474972a22ebf43db021036fc5d8df7.tar.gz |
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
-rw-r--r-- | ext/wayland/wlwindow.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c index c64c77a0d..65eec278d 100644 --- a/ext/wayland/wlwindow.c +++ b/ext/wayland/wlwindow.c @@ -112,7 +112,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); @@ -139,13 +138,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; } |