diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-11 12:45:13 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2014-03-17 21:53:55 -0400 |
commit | 72ccb27377886b9998ad8b5b7a3b3070474f90f3 (patch) | |
tree | 3ec7b22000cc643880b245e631fdf8ef5401e7e3 /daemon | |
parent | b04ac2a2e4487cd5ee771acfc7ed2e63935cf51f (diff) | |
download | gdm-72ccb27377886b9998ad8b5b7a3b3070474f90f3.tar.gz |
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 it manages its
own display. 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 activate its session on its own.
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 return FALSE.
https://bugzilla.gnome.org/show_bug.cgi?id=726380
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gdm-manager.c | 20 | ||||
-rw-r--r-- | daemon/gdm-session.c | 6 | ||||
-rw-r--r-- | daemon/gdm-session.h | 1 |
3 files changed, 26 insertions, 1 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index f55d11e0..5c59dc91 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_has_own_display_server (operation->session)) { + 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); + } else { + /* 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); + } start_user_session (operation->manager, operation); diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c index 7b6b5e27..45b8acc1 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -2691,6 +2691,12 @@ out: return bypasses_xsession; } +gboolean +gdm_session_has_own_display_server (GdmSession *self) +{ + return FALSE; +} + void gdm_session_select_program (GdmSession *self, const char *text) diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h index d953302b..1d264f40 100644 --- a/daemon/gdm-session.h +++ b/daemon/gdm-session.h @@ -111,6 +111,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); +gboolean gdm_session_has_own_display_server (GdmSession *session); void gdm_session_start_conversation (GdmSession *session, const char *service_name); |