[gdm/wip/wayland-take-2: 1/8] session: Introduce the concept of the "session display mode"



commit 8aa32402daa33be56ebfc9770444a726004b1279
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Mar 17 22:17:59 2014 -0400

    session: Introduce the concept of the "session display mode"
    
    The session display mode describes exactly how the worker
    environment will set up VTs, and whether the greeter X server
    will be reused for the user session.

 daemon/gdm-session.c |    8 ++++++++
 daemon/gdm-session.h |   18 ++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 7b6b5e2..85fbf0d 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2691,6 +2691,14 @@ out:
         return bypasses_xsession;
 }
 
+GdmSessionDisplayMode
+gdm_session_get_display_mode (GdmSession *self)
+{
+        /* X sessions are for now ran in classic mode where
+         * we reuse the existing greeter. */
+        return GDM_SESSION_DISPLAY_MODE_REUSE_VT;
+}
+
 void
 gdm_session_select_program (GdmSession *self,
                             const char *text)
diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h
index d953302..1d2ee7e 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -42,6 +42,23 @@ typedef enum
         GDM_SESSION_VERIFICATION_MODE_REAUTHENTICATE
 } GdmSessionVerificationMode;
 
+typedef enum {
+        /* We reuse the existing display server, e.g. X server
+         * in "classic" mode from the greeter for the first seat. */
+        GDM_SESSION_DISPLAY_MODE_REUSE_VT,
+
+        /* Doesn't know anything about VTs. Tries to set DRM
+         * master and will throw a tantrum if something bad
+         * happens. e.g. weston-launch or mutter-launch. */
+        GDM_SESSION_DISPLAY_MODE_NEW_VT,
+
+        /* Uses logind sessions to manage itself. We need to set an
+         * XDG_VTNR and it will switch to the correct VT on startup.
+         * e.g. mutter-wayland with logind integration, X server with
+         * logind integration. */
+        GDM_SESSION_DISPLAY_MODE_LOGIND_MANAGED,
+} GdmSessionDisplayMode;
+
 typedef struct
 {
         GObject            parent;
@@ -111,6 +128,7 @@ const char       *gdm_session_get_display_device          (GdmSession     *sessi
 const char       *gdm_session_get_display_seat_id         (GdmSession     *session);
 const char       *gdm_session_get_session_id              (GdmSession     *session);
 gboolean          gdm_session_bypasses_xsession           (GdmSession     *session);
+GdmSessionDisplayMode gdm_session_get_display_mode  (GdmSession     *session);
 
 void              gdm_session_start_conversation          (GdmSession *session,
                                                            const char *service_name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]