gl/wayland: fix xdg shell close notification

Don't segfault by not calling the appropriate callback that destroys
resources in the correct order.
This commit is contained in:
Matthew Waters 2020-03-03 11:42:11 +11:00 committed by GStreamer Merge Bot
parent 6dbda0681b
commit aa703285f9

View file

@ -234,11 +234,14 @@ static const struct wl_shell_surface_listener wl_shell_surface_listener = {
static void
handle_xdg_toplevel_close (void *data, struct xdg_toplevel *xdg_toplevel)
{
GstGLWindowWaylandEGL *window_egl = data;
GstGLWindow *window = data;
GST_DEBUG ("XDG toplevel got a \"close\" event.");
gst_gl_window_wayland_egl_close (GST_GL_WINDOW (window_egl));
if (window->close)
window->close (window->close_data);
gst_gl_display_remove_window (window->display, window);
}
static void