diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-12-09 22:04:09 -0500 |
---|---|---|
committer | Robert Ancell <robert.ancell@gmail.com> | 2019-12-10 16:48:39 +1300 |
commit | 03f218981733e50d810767f9d04e42ee156f7feb (patch) | |
tree | 0d9c0742304f08b317cb253f55aed3dc9575fda5 /src/seat.c | |
parent | fa30fc604c5f54cc10ef165d3c577ddd79afc637 (diff) | |
download | lightdm-git-03f218981733e50d810767f9d04e42ee156f7feb.tar.gz |
Determine a session is wayland with a better heuristic
Using the compiled in string WAYLAND_SESSIONS_DIR had some problems.
In environments like NixOS, which install packages under their
own immutable prefix under /nix/store. this assumption that the package
would be compiled with `datadir=/usr/share` will break down. Checking
if the directory contains the appropriate string is much simpler and will
work with platforms like NixOS (or others as this setup popularizes).
Diffstat (limited to 'src/seat.c')
-rw-r--r-- | src/seat.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -956,7 +956,7 @@ find_session_config (Seat *seat, const gchar *sessions_dir, const gchar *session for (int i = 0; dirs[i]; i++) { const gchar *default_session_type = "x"; - if (strcmp (dirs[i], WAYLAND_SESSIONS_DIR) == 0) + if (dirs[i] != NULL && g_str_has_suffix (dirs[i], "/wayland-sessions") == TRUE) default_session_type = "wayland"; g_autofree gchar *filename = g_strdup_printf ("%s.desktop", session_name); |