[gdm] libgdm: filter out wayland sessions from X11 login screen



commit 7a12733ca6474ea92ee5f24b5c0427cdade8dcc8
Author: Ray Strode <rstrode redhat com>
Date:   Wed Jun 17 09:32:46 2015 -0400

    libgdm: filter out wayland sessions from 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 shouldn't present those sessions to the user in the session list
    either.
    
    This commit makes sure to avoid showing wayland based sessions
    in the session list if the login screen is running on X11.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757715

 libgdm/gdm-sessions.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
index db62516..a645224 100644
--- a/libgdm/gdm-sessions.c
+++ b/libgdm/gdm-sessions.c
@@ -213,6 +213,10 @@ collect_sessions (void)
         }
 
 #ifdef ENABLE_WAYLAND_SUPPORT
+        if (g_getenv ("WAYLAND_DISPLAY") == NULL && g_getenv ("RUNNING_UNDER_GDM") != NULL) {
+                return;
+        }
+
         for (i = 0; wayland_search_dirs [i] != NULL; i++) {
                 collect_sessions_from_directory (wayland_search_dirs [i]);
         }


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