[gdm/wip/wayland-take-2: 2/8] manager: Don't reuse the same X server for alternate display modes



commit 504652bac50bedb85a2b36fb157f08be51c63a68
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Mar 17 22:15:48 2014 -0400

    manager: Don't reuse the same X server for alternate display modes
    
    GNOME is going to need a mode of operation in GDM where the session
    manages its own display server. In this mode of operation, we won't
    morph the login screen into a user session by reusing the same X server.
    
    Instead, we reset the login screen to prepare it for a future login,
    and then let GNOME or the session worker activate its own session.
    
    This commit adds the prerequisite work needed to gdm-manager.c, but
    only as dead code, since the way to "turn it on" is stubbed out to
    always reuse the existing server.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726380

 daemon/gdm-manager.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index f55d11e..e09f993 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -870,7 +870,25 @@ on_start_user_session (StartUserSessionOperation *operation)
         }
 
         display = get_display_for_user_session (operation->session);
-        gdm_display_stop_greeter_session (display);
+
+        if (gdm_session_get_display_mode (operation->session) == GDM_SESSION_DISPLAY_MODE_REUSE_VT) {
+                /* In this case, the greeter's display is morphing into
+                 * the user session display. Kill the greeter on this session
+                 * and let the seed session follow the same display. */
+                gdm_display_stop_greeter_session (display);
+        } else {
+                uid_t allowed_uid;
+
+                g_debug ("GdmManager: session has its display server, reusing our server for another login 
screen");
+
+                /* The seed session is going to follow the session worker
+                 * into the new display. Untie it from this display and
+                 * create a new seed session for us. */
+                allowed_uid = gdm_session_get_allowed_user (operation->session);
+                g_object_set_data (G_OBJECT (display), "gdm-seed-session", NULL);
+                g_object_set_data (G_OBJECT (operation->session), "gdm-display", NULL);
+                create_seed_session_for_display (operation->manager, display, allowed_uid);
+        }
 
         start_user_session (operation->manager, operation);
 


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