diff options
author | Ray Strode <rstrode@redhat.com> | 2015-06-17 09:32:46 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-11-06 22:20:18 -0500 |
commit | 246d9a23e702174396e69e019236e3d78c2309cf (patch) | |
tree | cd771431ed16d8656860a3a84b75309c307a383f | |
parent | 5f6edc4925701f8eef2ea983b638599dbe8e9acb (diff) | |
download | gdm-246d9a23e702174396e69e019236e3d78c2309cf.tar.gz |
manager: filter out wayland user sessions if X11 login screen
We use wayland by default on the login screen, so if we're running
in an X11 session, then the presumption is that we're incapable of
using wayland. If we're incapable of using wayland sessions then
we should ignore wayland sessions read from user configuration and
fall back to non-wayland defaults.
https://bugzilla.gnome.org/show_bug.cgi?id=757715
-rw-r--r-- | daemon/gdm-manager.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 7602e751..2c76540f 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -1345,8 +1345,11 @@ static void set_up_greeter_session (GdmManager *manager, GdmDisplay *display) { + GdmSession *session; + char *display_session_type = NULL; const char *allowed_user; struct passwd *passwd_entry; + gboolean greeter_is_wayland; allowed_user = get_username_for_greeter_display (manager, display); @@ -1358,7 +1361,18 @@ set_up_greeter_session (GdmManager *manager, return; } - create_embryonic_user_session_for_display (manager, display, passwd_entry->pw_uid); + session = create_embryonic_user_session_for_display (manager, display, passwd_entry->pw_uid); + + /* If the greeter display isn't a wayland session, + * then don't allow the user session to be a wayland + * session either. + */ + g_object_get (G_OBJECT (display), + "session-type", &display_session_type, + NULL); + greeter_is_wayland = g_strcmp0 (display_session_type, "wayland") == 0; + g_object_set (G_OBJECT (session), "ignore-wayland", !greeter_is_wayland, NULL); + gdm_display_start_greeter_session (display); } |