[gdm/wip/wayland-take-2: 3/9] manager: Don't reuse the same X server when we have a display server



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

    manager: Don't reuse the same X server when we have a display server
    
    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..13b7077 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_server_mode (operation->session) == 
GDM_DISPLAY_SERVER_MODE_REUSE_EXISTING_SERVER) {
+                /* 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]