Commit 5675903d authored by Marco Trevisan's avatar Marco Trevisan 🎺

session: add DATADIR/gdm/greeter to XDG Data dirs

These dirs could be parsed to add greeter session files.
parent 0621d80b
......@@ -353,10 +353,14 @@ get_system_session_dirs (GdmSession *self)
DATADIR "/xsessions/",
};
static const char *gdm_x_search_dir = DATADIR "/gdm/greeter/xsessions/";
static const char *gdm_wayland_search_dir = DATADIR "/gdm/greeter/wayland-sessions/";
static const char *wayland_search_dir = DATADIR "/wayland-sessions/";
search_array = g_array_new (TRUE, TRUE, sizeof (char *));
g_array_append_val(search_array, gdm_x_search_dir);
for (i = 0; system_data_dirs[i]; i++) {
gchar *dir = g_build_filename (system_data_dirs[i], "xsessions", NULL);
g_array_append_val (search_array, dir);
......@@ -367,6 +371,7 @@ get_system_session_dirs (GdmSession *self)
#ifdef ENABLE_WAYLAND_SUPPORT
if (!self->priv->ignore_wayland) {
#ifdef ENABLE_USER_DISPLAY_SERVER
g_array_prepend_val (search_array, gdm_wayland_search_dir);
g_array_prepend_val (search_array, wayland_search_dir);
for (i = 0; system_data_dirs[i]; i++) {
......@@ -374,6 +379,8 @@ get_system_session_dirs (GdmSession *self)
g_array_insert_val (search_array, i, dir);
}
#else
g_array_append_val(search_array, gdm_wayland_search_dir);
for (i = 0; system_data_dirs[i]; i++) {
gchar *dir = g_build_filename (system_data_dirs[i], "wayland-sessions", NULL);
g_array_append_val (search_array, dir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment