From 6db9468d8489cbe032c90ebcf39b85d0e7aad458 Mon Sep 17 00:00:00 2001 From: msizanoen1 Date: Mon, 7 Mar 2022 12:24:51 +0700 Subject: local-display-factory: Search for greeter sessions from logind before looking up the display from display store On non-primary seats, GDM will look up the display from display store and abort ensuring a display for seat. This causes the seat to have no active session when a user logs out, instead of the login screen. Fix this by searching for greeter sessions from logind before looking up the display from display store. --- daemon/gdm-local-display-factory.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'daemon/gdm-local-display-factory.c') diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index b54d4042..3f5af13c 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -768,13 +768,6 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory, g_debug ("GdmLocalDisplayFactory: display for seat %s requested", seat_id); - /* Ensure we don't create the same display more than once */ - display = get_display_for_seat (factory, seat_id); - if (display != NULL) { - g_debug ("GdmLocalDisplayFactory: display for %s already created", seat_id); - return; - } - /* If we already have a login window, switch to it */ if (gdm_get_login_window_session_id (seat_id, &login_session_id)) { GdmDisplay *display; @@ -895,6 +888,13 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory, g_debug ("GdmLocalDisplayFactory: %s login display for seat %s requested", session_types[0], seat_id); + /* Ensure we don't create the same display more than once */ + display = get_display_for_seat (factory, seat_id); + if (display != NULL) { + g_debug ("GdmLocalDisplayFactory: display for %s already created", seat_id); + return; + } + g_debug ("GdmLocalDisplayFactory: Adding display on seat %s", seat_id); #ifdef ENABLE_USER_DISPLAY_SERVER -- cgit v1.2.1