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



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

    session: Introduce the concept of the "display server mode"
    
    The display server 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 |    7 +++++++
 daemon/gdm-session.h |   18 ++++++++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 7b6b5e2..cdb8a3b 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2691,6 +2691,13 @@ out:
         return bypasses_xsession;
 }
 
+GdmDisplayServerMode
+gdm_session_get_display_server_mode (GdmSession *self)
+{
+        /* X sessions are for now ran in classic mode. */
+        return GDM_DISPLAY_SERVER_MODE_REUSE_EXISTING_SERVER;
+}
+
 void
 gdm_session_select_program (GdmSession *self,
                             const char *text)
diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h
index d953302..200a1eb 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 for the first seat. */
+        GDM_DISPLAY_SERVER_MODE_REUSE_EXISTING_SERVER,
+
+        /* 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_DISPLAY_SERVER_MODE_LOGIND_AWARE,
+
+        /* 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_DISPLAY_SERVER_MODE_VT_UNAWARE,
+} GdmDisplayServerMode;
+
 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);
+GdmDisplayServerMode gdm_session_get_display_server_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]