summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-03-17 22:15:48 -0400
committerRay Strode <rstrode@redhat.com>2014-03-18 00:38:35 -0400
commit33225d4d900ccc52256ebecf87d2f80de0013d79 (patch)
tree26bb4d21636db23558ffeb8ca857ce5b24c67d59
parent4313a017b4a0b79dea6c9c50c9e1ebf09c6f8774 (diff)
downloadgdm-33225d4d900ccc52256ebecf87d2f80de0013d79.tar.gz
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
-rw-r--r--daemon/gdm-manager.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index f55d11e0..e09f993a 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);