diff options
author | Ray Strode <rstrode@redhat.com> | 2018-07-30 16:21:29 -0400 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2018-08-02 20:06:36 +0000 |
commit | 5e737a57402fa626af7f037b9485bd172c8a3dff (patch) | |
tree | f57c7b738d025aef9ac83908fd0d927478fbe438 /daemon/gdm-manager.c | |
parent | 6574b4f2705ae7e37e7e57d6b57190094c2467c7 (diff) | |
download | gdm-5e737a57402fa626af7f037b9485bd172c8a3dff.tar.gz |
daemon: try harder to get to a login screen at logout
commit 22c332ba and some follow up commits try to ensure the
user never stays on a blank VT by jumping to a login screen in
the event they'd end up on one.
Unfortunately, that part of the code can't start a login screen
if there's not one running at all.
This commit moves the code to GdmLocalDisplyFactory where the
login screens are created, so users won't end up on a blank
VT even if no login screen is yet running.
Diffstat (limited to 'daemon/gdm-manager.c')
-rw-r--r-- | daemon/gdm-manager.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 11945522..f17bd1a5 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -1287,53 +1287,6 @@ maybe_start_pending_initial_login (GdmManager *manager, g_free (user_session_seat_id); } -static void -activate_login_window_session_on_seat (GdmManager *self, - const char *seat_id) -{ - char *session_id; - - if (!gdm_get_login_window_session_id (seat_id, &session_id)) { - return; - } - - if (session_id) { - gdm_activate_session_by_id (self, seat_id, session_id); - g_free (session_id); - } -} - -static void -maybe_activate_other_session (GdmManager *self, - GdmDisplay *old_display) -{ - char *seat_id = NULL; - char *session_id = NULL; - int ret; - - g_object_get (G_OBJECT (old_display), - "seat-id", &seat_id, - NULL); - - ret = sd_seat_get_active (seat_id, &session_id, NULL); - - if (ret == 0) { - GdmDisplay *display; - - display = gdm_display_store_find (self->priv->display_store, - lookup_by_session_id, - (gpointer) session_id); - - if (display == NULL || gdm_display_get_status (display) == GDM_DISPLAY_FINISHED) { - activate_login_window_session_on_seat (self, seat_id); - } - - g_free (session_id); - } - - g_free (seat_id); -} - static const char * get_username_for_greeter_display (GdmManager *manager, GdmDisplay *display) @@ -1579,7 +1532,6 @@ on_display_status_changed (GdmDisplay *display, manager->priv->ran_once = TRUE; } maybe_start_pending_initial_login (manager, display); - maybe_activate_other_session (manager, display); break; default: break; |