gtkwaylandsink: Destroy GstWlWindow when parent GtkWindow is destroyed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4197>
This commit is contained in:
Colin Kinloch 2023-03-16 16:02:26 +00:00 committed by GStreamer Marge Bot
parent f75d4f5f9f
commit 6ebd7867e0

View file

@ -244,6 +244,7 @@ window_destroy_cb (GtkWidget * widget, GstGtkWaylandSink * self)
gst_gtk_wayland_sink_get_instance_private (self);
GST_OBJECT_LOCK (self);
g_clear_object (&priv->wl_window);
priv->gtk_window = NULL;
GST_OBJECT_UNLOCK (self);
@ -651,6 +652,7 @@ gst_gtk_wayland_sink_stop_on_main (GstGtkWaylandSink * self)
g_signal_handler_disconnect (priv->gtk_window,
priv->gtk_window_destroy_id);
priv->gtk_window_destroy_id = 0;
g_clear_object (&priv->wl_window);
gtk_widget_destroy (priv->gtk_window);
priv->gtk_window = NULL;
}