[mutter/halfline/wip/kms-cleanups: 4/9] native: Add getter for seat id
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/halfline/wip/kms-cleanups: 4/9] native: Add getter for seat id
- Date: Thu, 10 Mar 2016 21:12:22 +0000 (UTC)
commit bb074022c6dbd8893cd5ecd4414a788f4f55d38d
Author: Ray Strode <rstrode redhat com>
Date: Fri Jan 8 12:44:01 2016 -0500
native: Add getter for seat id
We ultimately want to move the rendering related code
off to a separate file. When moved that code will need
the seat id, determined by the session controller, so
that it can identify the most appropriate GPU/card node
to use.
This commit adds a getter for the seat id.
src/backends/native/meta-session-controller.c | 10 +++++++++-
src/backends/native/meta-session-controller.h | 1 +
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/backends/native/meta-session-controller.c b/src/backends/native/meta-session-controller.c
index cc1def2..1a711a0 100644
--- a/src/backends/native/meta-session-controller.c
+++ b/src/backends/native/meta-session-controller.c
@@ -50,6 +50,7 @@ struct _MetaSessionController
{
Login1Session *session_proxy;
Login1Seat *seat_proxy;
+ char *seat_id;
gboolean session_active;
};
@@ -482,13 +483,13 @@ meta_session_controller_new (GError **error)
self = g_slice_new0 (MetaSessionController);
self->session_proxy = session_proxy;
self->seat_proxy = seat_proxy;
+ self->seat_id = seat_id;
self->session_active = TRUE;
if (!get_kms_fd (session_proxy, seat_id, &kms_fd, error))
goto fail;
- free (seat_id);
clutter_egl_set_kms_fd (kms_fd);
clutter_evdev_set_device_callbacks (on_evdev_device_open,
@@ -512,11 +513,18 @@ meta_session_controller_new (GError **error)
return NULL;
}
+const char *
+meta_session_controller_get_seat_id (MetaSessionController *self)
+{
+ return self->seat_id;
+}
+
void
meta_session_controller_free (MetaSessionController *self)
{
g_object_unref (self->seat_proxy);
g_object_unref (self->session_proxy);
+ free (self->seat_id);
g_slice_free (MetaSessionController, self);
}
diff --git a/src/backends/native/meta-session-controller.h b/src/backends/native/meta-session-controller.h
index f2561cb..747e56a 100644
--- a/src/backends/native/meta-session-controller.h
+++ b/src/backends/native/meta-session-controller.h
@@ -25,6 +25,7 @@
typedef struct _MetaSessionController MetaSessionController;
MetaSessionController *meta_session_controller_new (GError **error);
+const char *meta_session_controller_get_seat_id (MetaSessionController *self);
void meta_session_controller_free (MetaSessionController *self);
gboolean meta_session_controller_activate_session (MetaSessionController *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]