summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-03-06 14:14:29 -0500
committerRay Strode <rstrode@redhat.com>2014-03-17 21:38:35 -0400
commitb28bc6cc8d560757f2dc9f55aee4744f63bd1907 (patch)
tree1e2cfa52335530570e0eb9f891b672c85b304bbd
parent9d3ef3b40264319fc83f9b5e5129e0ffc45e2271 (diff)
downloadgdm-b28bc6cc8d560757f2dc9f55aee4744f63bd1907.tar.gz
manager: Make migrated a special case when starting the session
We have three cases for starting a session: 1) We migrate to an existing session. Simply tear down state and switch. 2) We're starting a new session, and it's a traditional Xorg server. Tear down the greeter, and keep the same X server and GdmDisplay, and start a full user session. 3) We're starting a new session, but it's a display server. Keep the greeter around and give it a new seed session, and start a full user session. The last two cases are really the two sides of the same coin, while the migrated case is really a fast-path special case that doesn't involve launching a user session in any case, so use a "goto out;" as a fast return rather than an if/else. https://bugzilla.gnome.org/show_bug.cgi?id=726380
-rw-r--r--daemon/gdm-manager.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 40e0ffeb..6b478707 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -848,6 +848,7 @@ on_start_user_session (StartUserSessionOperation *operation)
{
gboolean migrated;
gboolean fail_if_already_switched = TRUE;
+ GdmDisplay *display;
g_debug ("GdmManager: start or jump to session");
@@ -865,15 +866,15 @@ on_start_user_session (StartUserSessionOperation *operation)
user switching. */
gdm_session_reset (operation->session);
destroy_start_user_session_operation (operation);
- } else {
- GdmDisplay *display;
+ goto out;
+ }
- display = get_display_for_user_session (operation->session);
- gdm_display_stop_greeter_session (display);
+ display = get_display_for_user_session (operation->session);
+ gdm_display_stop_greeter_session (display);
- start_user_session (operation->manager, operation);
- }
+ start_user_session (operation->manager, operation);
+ out:
return G_SOURCE_REMOVE;
}