screencast: Do not stop remote desktop session when a stream closes

In remote desktop sessions, streams can be created and destroyed
on-the-fly.
If a stream is gone, it is not necessarily an error.
So, don't treat that situation like an erroneous one.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2911>
This commit is contained in:
Pascal Nowack 2023-02-19 15:08:59 +01:00 committed by Jonas Ådahl
parent 01ecaf10ef
commit 712c9a1700

View File

@ -350,7 +350,17 @@ static void
on_stream_closed (MetaScreenCastStream *stream,
MetaScreenCastSession *session)
{
meta_dbus_session_close (META_DBUS_SESSION (session));
session->streams = g_list_remove (session->streams, stream);
g_object_unref (stream);
switch (session->session_type)
{
case META_SCREEN_CAST_SESSION_TYPE_NORMAL:
meta_dbus_session_close (META_DBUS_SESSION (session));
break;
case META_SCREEN_CAST_SESSION_TYPE_REMOTE_DESKTOP:
break;
}
}
static gboolean