mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
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:
parent
81512ad0dc
commit
8c1e6ebde0
@ -28,4 +28,7 @@ void meta_remote_access_controller_notify_new_handle (MetaRemoteAccessController
|
||||
|
||||
void meta_remote_access_handle_notify_stopped (MetaRemoteAccessHandle *handle);
|
||||
|
||||
void meta_remote_access_handle_set_disable_animations (MetaRemoteAccessHandle *handle,
|
||||
gboolean disable_animations);
|
||||
|
||||
#endif /* META_REMOTE_ACCESS_CONTROLLER_PRIVATE_H */
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -91,6 +91,10 @@ init_remote_access_handle (MetaScreenCastSession *session)
|
||||
|
||||
remote_access_controller = meta_backend_get_remote_access_controller (backend);
|
||||
remote_access_handle = META_REMOTE_ACCESS_HANDLE (session->handle);
|
||||
|
||||
meta_remote_access_handle_set_disable_animations (remote_access_handle,
|
||||
session->disable_animations);
|
||||
|
||||
meta_remote_access_controller_notify_new_handle (remote_access_controller,
|
||||
remote_access_handle);
|
||||
}
|
||||
|
@ -43,6 +43,9 @@ struct _MetaRemoteAccessHandleClass
|
||||
META_EXPORT
|
||||
void meta_remote_access_handle_stop (MetaRemoteAccessHandle *handle);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_remote_access_handle_get_disable_animations (MetaRemoteAccessHandle *handle);
|
||||
|
||||
#define META_TYPE_REMOTE_ACCESS_CONTROLLER meta_remote_access_controller_get_type ()
|
||||
|
||||
META_EXPORT
|
||||
|
Loading…
Reference in New Issue
Block a user