[gdm/session-selection-again: 2/3] manager: Plumb supported-session-types down to the session




commit a8aaee20763f790be1b214a2cdbbaab0969a0e01
Author: Ray Strode <rstrode redhat com>
Date:   Wed Jul 28 12:12:41 2021 -0400

    manager: Plumb supported-session-types down to the session
    
    The session code needs to know what session types are supported
    for user sessions when deciding which type of session to use at
    command generation time.
    
    This commit makes sure that information gets plumbed down.

 daemon/gdm-manager.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index e433acf3b..4c2752fee 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1333,7 +1333,7 @@ set_up_automatic_login_session (GdmManager *manager,
                                 GdmDisplay *display)
 {
         GdmSession *session;
-        char       *display_session_type = NULL;
+        g_auto (GStrv) supported_session_types = NULL;
 
         /* 0 is root user; since the daemon talks to the session object
          * directly, itself, for automatic login
@@ -1342,11 +1342,12 @@ set_up_automatic_login_session (GdmManager *manager,
         session = get_user_session_for_display (display);
 
         g_object_get (G_OBJECT (display),
-                      "session-type", &display_session_type,
+                      "supported-session-types", &supported_session_types,
                       NULL);
 
         g_object_set (G_OBJECT (session),
                       "display-is-initial", FALSE,
+                      "supported-session-types", supported_session_types,
                       NULL);
 
         g_debug ("GdmManager: Starting automatic login conversation");
@@ -2305,9 +2306,7 @@ create_user_session_for_display (GdmManager *manager,
         char       *display_auth_file = NULL;
         char       *display_seat_id = NULL;
         char       *display_id = NULL;
-#if defined(ENABLE_WAYLAND_SUPPORT) && defined(ENABLE_USER_DISPLAY_SERVER)
-        g_autofree char *display_session_type = NULL;
-#endif
+        g_auto (GStrv) supported_session_types = NULL;
 
         g_object_get (G_OBJECT (display),
                       "id", &display_id,
@@ -2316,9 +2315,7 @@ create_user_session_for_display (GdmManager *manager,
                       "remote-hostname", &remote_hostname,
                       "x11-authority-file", &display_auth_file,
                       "seat-id", &display_seat_id,
-#if defined(ENABLE_WAYLAND_SUPPORT) && defined(ENABLE_USER_DISPLAY_SERVER)
-                      "session-type", &display_session_type,
-#endif
+                      "supported-session-types", &supported_session_types,
                       NULL);
         display_device = get_display_device (manager, display);
 
@@ -2331,6 +2328,9 @@ create_user_session_for_display (GdmManager *manager,
                                    display_auth_file,
                                    display_is_local,
                                    NULL);
+        g_object_set (G_OBJECT (session),
+                      "supported-session-types", supported_session_types,
+                      NULL);
 
         g_debug ("GdmSession: Created user session for user %d on display %s (seat %s)",
                  (int) allowed_user,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]