screen-cast-session: Add is-active tracking
Will be used to determine one can start a new recording or not. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2131>
This commit is contained in:
parent
3c1f50a85e
commit
764c75d2fb
@ -51,6 +51,7 @@ struct _MetaScreenCastSession
|
||||
|
||||
MetaScreenCastSessionHandle *handle;
|
||||
|
||||
gboolean is_active;
|
||||
gboolean disable_animations;
|
||||
};
|
||||
|
||||
@ -117,14 +118,24 @@ meta_screen_cast_session_start (MetaScreenCastSession *session,
|
||||
|
||||
init_remote_access_handle (session);
|
||||
|
||||
session->is_active = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_screen_cast_session_is_active (MetaScreenCastSession *session)
|
||||
{
|
||||
return session->is_active;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_cast_session_close (MetaScreenCastSession *session)
|
||||
{
|
||||
MetaDBusScreenCastSession *skeleton = META_DBUS_SCREEN_CAST_SESSION (session);
|
||||
|
||||
session->is_active = FALSE;
|
||||
|
||||
g_list_free_full (session->streams, g_object_unref);
|
||||
|
||||
meta_dbus_session_notify_closed (META_DBUS_SESSION (session));
|
||||
|
@ -59,6 +59,8 @@ MetaScreenCastSession * meta_screen_cast_session_new (MetaScreenCast
|
||||
gboolean meta_screen_cast_session_start (MetaScreenCastSession *session,
|
||||
GError **error);
|
||||
|
||||
gboolean meta_screen_cast_session_is_active (MetaScreenCastSession *session);
|
||||
|
||||
void meta_screen_cast_session_close (MetaScreenCastSession *session);
|
||||
|
||||
MetaScreenCastStream * meta_screen_cast_session_get_stream (MetaScreenCastSession *session,
|
||||
|
Loading…
Reference in New Issue
Block a user