remote-access-handle: Expose disable-animations property

Set to TRUE if a screen cast session asked for animations to be
disabled.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
This commit is contained in:
Jonas Ådahl
2019-09-24 11:11:48 +02:00
parent 81512ad0dc
commit 8c1e6ebde0
4 changed files with 38 additions and 0 deletions

View File

@ -43,6 +43,8 @@ static int controller_signals[N_CONTROLLER_SIGNALS];
typedef struct _MetaRemoteAccessHandlePrivate
{
gboolean has_stopped;
gboolean disable_animations;
} MetaRemoteAccessHandlePrivate;
G_DEFINE_TYPE_WITH_PRIVATE (MetaRemoteAccessHandle,
@ -76,6 +78,32 @@ meta_remote_access_handle_stop (MetaRemoteAccessHandle *handle)
META_REMOTE_ACCESS_HANDLE_GET_CLASS (handle)->stop (handle);
}
/**
* meta_remote_access_get_disable_animations:
* @handle: A #MetaRemoteAccessHandle
*
* Returns: %TRUE if the remote access requested that animations should be
* disabled.
*/
gboolean
meta_remote_access_handle_get_disable_animations (MetaRemoteAccessHandle *handle)
{
MetaRemoteAccessHandlePrivate *priv =
meta_remote_access_handle_get_instance_private (handle);
return priv->disable_animations;
}
void
meta_remote_access_handle_set_disable_animations (MetaRemoteAccessHandle *handle,
gboolean disable_animations)
{
MetaRemoteAccessHandlePrivate *priv =
meta_remote_access_handle_get_instance_private (handle);
priv->disable_animations = disable_animations;
}
void
meta_remote_access_handle_notify_stopped (MetaRemoteAccessHandle *handle)
{