mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
remote-desktop: Add backend getter
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1739>
This commit is contained in:
parent
e2a68b5ba1
commit
adc6537917
@ -619,7 +619,8 @@ meta_backend_real_post_init (MetaBackend *backend)
|
||||
priv->dbus_session_watcher = g_object_new (META_TYPE_DBUS_SESSION_WATCHER, NULL);
|
||||
priv->screen_cast = meta_screen_cast_new (backend,
|
||||
priv->dbus_session_watcher);
|
||||
priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
|
||||
priv->remote_desktop = meta_remote_desktop_new (backend,
|
||||
priv->dbus_session_watcher);
|
||||
priv->remote_access_controller =
|
||||
meta_remote_access_controller_new (priv->remote_desktop, priv->screen_cast);
|
||||
#endif /* HAVE_REMOTE_DESKTOP */
|
||||
|
@ -54,6 +54,7 @@ struct _MetaRemoteDesktop
|
||||
{
|
||||
MetaDBusRemoteDesktopSkeleton parent;
|
||||
|
||||
MetaBackend *backend;
|
||||
int dbus_name_id;
|
||||
|
||||
int inhibit_count;
|
||||
@ -100,6 +101,12 @@ meta_remote_desktop_uninhibit (MetaRemoteDesktop *remote_desktop)
|
||||
remote_desktop->inhibit_count--;
|
||||
}
|
||||
|
||||
MetaBackend *
|
||||
meta_remote_desktop_get_backend (MetaRemoteDesktop *remote_desktop)
|
||||
{
|
||||
return remote_desktop->backend;
|
||||
}
|
||||
|
||||
GDBusConnection *
|
||||
meta_remote_desktop_get_connection (MetaRemoteDesktop *remote_desktop)
|
||||
{
|
||||
@ -260,11 +267,13 @@ meta_remote_desktop_finalize (GObject *object)
|
||||
}
|
||||
|
||||
MetaRemoteDesktop *
|
||||
meta_remote_desktop_new (MetaDbusSessionWatcher *session_watcher)
|
||||
meta_remote_desktop_new (MetaBackend *backend,
|
||||
MetaDbusSessionWatcher *session_watcher)
|
||||
{
|
||||
MetaRemoteDesktop *remote_desktop;
|
||||
|
||||
remote_desktop = g_object_new (META_TYPE_REMOTE_DESKTOP, NULL);
|
||||
remote_desktop->backend = backend;
|
||||
remote_desktop->session_watcher = session_watcher;
|
||||
|
||||
return remote_desktop;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "backends/meta-backend-types.h"
|
||||
#include "backends/meta-dbus-session-watcher.h"
|
||||
|
||||
#include "meta-dbus-remote-desktop.h"
|
||||
@ -40,11 +41,14 @@ void meta_remote_desktop_inhibit (MetaRemoteDesktop *remote_desktop);
|
||||
|
||||
void meta_remote_desktop_uninhibit (MetaRemoteDesktop *remote_desktop);
|
||||
|
||||
MetaBackend * meta_remote_desktop_get_backend (MetaRemoteDesktop *remote_desktop);
|
||||
|
||||
MetaRemoteDesktopSession * meta_remote_desktop_get_session (MetaRemoteDesktop *remote_desktop,
|
||||
const char *session_id);
|
||||
|
||||
GDBusConnection * meta_remote_desktop_get_connection (MetaRemoteDesktop *remote_desktop);
|
||||
|
||||
MetaRemoteDesktop * meta_remote_desktop_new (MetaDbusSessionWatcher *session_watcher);
|
||||
MetaRemoteDesktop * meta_remote_desktop_new (MetaBackend *backend,
|
||||
MetaDbusSessionWatcher *session_watcher);
|
||||
|
||||
#endif /* META_REMOTE_DESKTOP_H */
|
||||
|
Loading…
Reference in New Issue
Block a user