Blame SOURCES/0010-manager-start-login-screen-if-old-one-is-finished.patch

a1b388
From 2ec1b65c7bc2cefeabbd9a7a3a50436e1233804c Mon Sep 17 00:00:00 2001
a1b388
From: Ray Strode <rstrode@redhat.com>
a1b388
Date: Fri, 22 Jun 2018 14:55:39 -0400
a1b388
Subject: [PATCH 10/51] manager: start login screen if old one is finished
a1b388
a1b388
Since commit 22c332ba we try to start a login screen if we end up
a1b388
on an empty VT and there isn't one running.
a1b388
a1b388
Unfortunately the check for "is on an empty VT" is a little busted.
a1b388
It counts the VT has non-empty if there's a display associated with
a1b388
it, even if that display is in the FINISHED state about to be
a1b388
reaped.
a1b388
a1b388
That means, in some cases, we'll still leave the user on an empty
a1b388
VT with no login screen.
a1b388
a1b388
This commit addresses the problem by explicitly checking for
a1b388
FINISHED displays, and proceeding even in their presense.
a1b388
---
a1b388
 daemon/gdm-manager.c | 2 +-
a1b388
 1 file changed, 1 insertion(+), 1 deletion(-)
a1b388
a1b388
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
a1b388
index a4dad92ee..a6f13dec7 100644
a1b388
--- a/daemon/gdm-manager.c
a1b388
+++ b/daemon/gdm-manager.c
a1b388
@@ -1444,61 +1444,61 @@ activate_login_window_session_on_seat (GdmManager *self,
a1b388
                 return;
a1b388
         }
a1b388
 
a1b388
         if (session_id) {
a1b388
                 activate_session_id (self, seat_id, session_id);
a1b388
                 g_free (session_id);
a1b388
         }
a1b388
 }
a1b388
 
a1b388
 static void
a1b388
 maybe_activate_other_session (GdmManager *self,
a1b388
                               GdmDisplay *old_display)
a1b388
 {
a1b388
         char *seat_id = NULL;
a1b388
         char *session_id = NULL;
a1b388
         int ret;
a1b388
 
a1b388
         g_object_get (G_OBJECT (old_display),
a1b388
                       "seat-id", &seat_id,
a1b388
                       NULL);
a1b388
 
a1b388
         ret = sd_seat_get_active (seat_id, &session_id, NULL);
a1b388
 
a1b388
         if (ret == 0) {
a1b388
                 GdmDisplay *display;
a1b388
 
a1b388
                 display = gdm_display_store_find (self->priv->display_store,
a1b388
                                                   lookup_by_session_id,
a1b388
                                                   (gpointer) session_id);
a1b388
 
a1b388
-                if (display == NULL) {
a1b388
+                if (display == NULL || gdm_display_get_status (display) == GDM_DISPLAY_FINISHED) {
a1b388
                         activate_login_window_session_on_seat (self, seat_id);
a1b388
                 }
a1b388
 
a1b388
                 g_free (session_id);
a1b388
         }
a1b388
 
a1b388
         g_free (seat_id);
a1b388
 }
a1b388
 
a1b388
 static const char *
a1b388
 get_username_for_greeter_display (GdmManager *manager,
a1b388
                                   GdmDisplay *display)
a1b388
 {
a1b388
         gboolean doing_initial_setup = FALSE;
a1b388
 
a1b388
         g_object_get (G_OBJECT (display),
a1b388
                       "doing-initial-setup", &doing_initial_setup,
a1b388
                       NULL);
a1b388
 
a1b388
         if (doing_initial_setup) {
a1b388
                 return INITIAL_SETUP_USERNAME;
a1b388
         } else {
a1b388
                 return GDM_USERNAME;
a1b388
         }
a1b388
 }
a1b388
 
a1b388
 static void
a1b388
 set_up_automatic_login_session (GdmManager *manager,
a1b388
                                 GdmDisplay *display)
a1b388
 {
a1b388
-- 
a1b388
2.27.0
a1b388