summaryrefslogtreecommitdiff
path: root/daemon/gdm-session.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-11-09 11:33:01 -0500
committerRay Strode <rstrode@redhat.com>2015-11-09 13:05:11 -0500
commit6cd2d248250f08b033fac6dffdc95e2dc83ffb4a (patch)
tree3841827d24fe15bc06ff952a4b7e2c685dbee9f9 /daemon/gdm-session.c
parent26006da375bc38afb270296e927d71180f6bed01 (diff)
downloadgdm-6cd2d248250f08b033fac6dffdc95e2dc83ffb4a.tar.gz
session: give wayland sessions priority
If two sessions have the same name, give the wayland one priority, unless wayland sessions are being ignored. https://bugzilla.gnome.org/show_bug.cgi?id=757715
Diffstat (limited to 'daemon/gdm-session.c')
-rw-r--r--daemon/gdm-session.c13
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;
}