mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
gtkwaylandsink: Destroy GstWlWindow when parent GtkWindow is destroyed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4197>
This commit is contained in:
parent
f75d4f5f9f
commit
6ebd7867e0
1 changed files with 2 additions and 0 deletions
|
@ -244,6 +244,7 @@ window_destroy_cb (GtkWidget * widget, GstGtkWaylandSink * self)
|
||||||
gst_gtk_wayland_sink_get_instance_private (self);
|
gst_gtk_wayland_sink_get_instance_private (self);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (self);
|
GST_OBJECT_LOCK (self);
|
||||||
|
g_clear_object (&priv->wl_window);
|
||||||
priv->gtk_window = NULL;
|
priv->gtk_window = NULL;
|
||||||
GST_OBJECT_UNLOCK (self);
|
GST_OBJECT_UNLOCK (self);
|
||||||
|
|
||||||
|
@ -651,6 +652,7 @@ gst_gtk_wayland_sink_stop_on_main (GstGtkWaylandSink * self)
|
||||||
g_signal_handler_disconnect (priv->gtk_window,
|
g_signal_handler_disconnect (priv->gtk_window,
|
||||||
priv->gtk_window_destroy_id);
|
priv->gtk_window_destroy_id);
|
||||||
priv->gtk_window_destroy_id = 0;
|
priv->gtk_window_destroy_id = 0;
|
||||||
|
g_clear_object (&priv->wl_window);
|
||||||
gtk_widget_destroy (priv->gtk_window);
|
gtk_widget_destroy (priv->gtk_window);
|
||||||
priv->gtk_window = NULL;
|
priv->gtk_window = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue