[mutter] remote-desktop: Add backend getter
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] remote-desktop: Add backend getter
- Date: Thu, 4 Mar 2021 18:01:57 +0000 (UTC)
commit adc6537917627fe5426fc58492a6e740023471ba
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Feb 23 08:59:43 2021 +0100
remote-desktop: Add backend getter
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1739>
src/backends/meta-backend.c | 3 ++-
src/backends/meta-remote-desktop.c | 11 ++++++++++-
src/backends/meta-remote-desktop.h | 6 +++++-
3 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index def62c49aa..0788cf1025 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -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 */
diff --git a/src/backends/meta-remote-desktop.c b/src/backends/meta-remote-desktop.c
index 1b73f4a917..0c9d4f0ad7 100644
--- a/src/backends/meta-remote-desktop.c
+++ b/src/backends/meta-remote-desktop.c
@@ -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;
diff --git a/src/backends/meta-remote-desktop.h b/src/backends/meta-remote-desktop.h
index 210a84a040..3a7f385632 100644
--- a/src/backends/meta-remote-desktop.h
+++ b/src/backends/meta-remote-desktop.h
@@ -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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]