diff options
author | Ray Strode <rstrode@redhat.com> | 2021-07-28 12:12:41 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2021-07-28 12:27:45 -0400 |
commit | 4a7ef1e94fbfaf4ed2506183b3ef35f2ff458a62 (patch) | |
tree | e2fdb308ec54155422ca8f93c97cc67138814b40 | |
parent | 887e462fbc4840bf9b97f101f15c6015b461f11f (diff) | |
download | gdm-4a7ef1e94fbfaf4ed2506183b3ef35f2ff458a62.tar.gz |
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.
-rw-r--r-- | daemon/gdm-manager.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index e433acf3..4c2752fe 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, |