diff options
Diffstat (limited to 'daemon/gdm-session.c')
-rw-r--r-- | daemon/gdm-session.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c index fa316696..8a2a97e5 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -338,23 +338,22 @@ static const char ** get_system_session_dirs (GdmSession *self) { static const char *search_dirs[] = { +#ifdef ENABLE_WAYLAND_SUPPORT + DATADIR "/wayland-sessions/", +#endif "/etc/X11/sessions/", DMCONFDIR "/Sessions/", DATADIR "/gdm/BuiltInSessions/", DATADIR "/xsessions/", -#ifdef ENABLE_WAYLAND_SUPPORT - NULL, -#endif NULL }; #ifdef ENABLE_WAYLAND_SUPPORT - if (!self->priv->ignore_wayland) { - search_dirs[G_N_ELEMENTS (search_dirs) - 1] = DATADIR "/wayland-sessions/"; - } else { - search_dirs[G_N_ELEMENTS (search_dirs) - 1] = NULL; + if (self->priv->ignore_wayland) { + return search_dirs + 1; } #endif + return search_dirs; } |