[gdm] manager: Make migrated a special case when starting the session
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] manager: Make migrated a special case when starting the session
- Date: Tue, 18 Mar 2014 01:40:37 +0000 (UTC)
commit b28bc6cc8d560757f2dc9f55aee4744f63bd1907
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Mar 6 14:14:29 2014 -0500
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
daemon/gdm-manager.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 40e0ffe..6b47870 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]